Results 1 to 2 of 2

Thread: [Java] Checking hotmail availability

  1. #1

    Joined
    Jul 2013
    Posts
    32
    Userbars
    0
    Thanks
    2
    Thanked
    9/5
    DL/UL
    4/1
    Mentioned
    5 times
    Time Online
    18h 32m
    Avg. Time Online
    N/A

    [Java] Checking hotmail availability

    I have a few hundred thousand hotmail emails to check if they are available, and I can't find a public program that can do this anymore so I thought I would make my own. I am using this site to test if they are available or not: (you need an account to see links). However something isn't right because the cookie that gets returned always is set to "MSPMemberExists=OtherError" so my checkEmail method always returns false. Does anyone have any ideas as to why this isn't working?
    Code:
        private boolean checkEmail(String email) {
            HttpsURLConnection connection = null;
            try {
                URL url = new URL("https://accountservices.passport.net/pp1450/memberexists.srf?x=" + new Date().getTime());
                connection = (HttpsURLConnection) url.openConnection();
                connection.setRequestMethod("GET");
                connection.setRequestProperty("Cookie", "MSPMemberExists=" + email);
            } catch (MalformedURLException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                return connection.getHeaderField("Set-Cookie").contains("MSPMemberExists=" + email);
            }
        }

  2. #2

    Joined
    Jul 2013
    Posts
    32
    Userbars
    0
    Thanks
    2
    Thanked
    9/5
    DL/UL
    4/1
    Mentioned
    5 times
    Time Online
    18h 32m
    Avg. Time Online
    N/A
    For anyone that is interested, the reason I was getting MSPMemberExists=OtherError was because the emails I was using were not valid which was causing the error. When I put in valid emails it worked like it was supposed to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •