Unity Community


Results 1 to 6 of 6

  1. Location
    india
    Posts
    269

    A server with the specified hostname could not be found.

    Hi guys

    I am trying to register an user to my server & post highscore but when I build & run it over iPhone or iPod or iPad it giving me this error(Enters the if part)

    A server with the specified hostname could not be found.
    were as if I am doing the same thing from the unity3d Editor it works properly !(Enters the else part)

    why could this be happening Iam using the following method

    Code:  
    1.         string registerUserURL= "http://abcd.com/abcd/createuser.php?username="+userName+"&password="+passWord+"&email="+emailId;
    2.                
    3.         WWW registerUser_post = new WWW(registerUserURL);
    4.  
    5.         yield return registerUser_post; // Wait until the download is done
    6.        
    7.         if (registerUser_post.error != null)
    8.         {
    9.             Debug.Log("There was an error loging In the user: " + registerUser_post.error);
    10.         }
    11.         else
    12.         {
    13.             Debug.Log(registerUser_post.text);
    14.            
    15.             severResponse = registerUser_post.text;
    16.         }

    The above code is in a function that I call as soon as the user clicks the register button

    Any suggestions pls

    Thanks
    Raviraj C. Vaidya
    Rraviraj vaidya


  2. Posts
    3
    bumping this thread, I'm having exactly the same problem and no solution until now


  3. Location
    india
    Posts
    269
    Got it its the problem with the "@" sign that we pass in the email Id so the solution for this is use it some thing like this

    string registerUserURL= "http://abcd.com/abcd/createuser.php?username="+userName+"&password="+pa ssWord+"&email="+WWW.EscapeURL(emailId);

    This converts the string into a URL friendly format.
    Rraviraj vaidya


  4. Posts
    3
    Wow thanks a lot, that works. I initially put the "EscapeURL" but I thought the string will not be similar as the URL parameters. Many thanks! =D


  5. Location
    Australia
    Posts
    49
    Thank you raviraj_vdy!

    This one caught me too. It's funny how the simple things cause the most havok.


  6. Location
    india
    Posts
    269
    Thank you all. good to know that the solutions is helping.
    Rraviraj vaidya

Posting Permissions

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