• Advertisement
Sign in to follow this  

gethostbyname fails

This topic is 4075 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, In my game I use winsock to download a list of IPs from a master server php script. It works fine for me, however I use an internet proxy, so for me gethostbyname connects to the proxy, sending a GET with the full url. However, for everyone else who has tested it gethostbyname() fails with error 11004. They have a direct connection, gethostbyname attempting to connect to my website (http://xzist.org). This is what MSDN says about the error:
Quote:
The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for. The usual example for this is a host name-to-address translation attempt (using gethostbyname or WSAAsyncGetHostByName) which uses the DNS (Domain Name Server). An MX record is returned but no A record—indicating the host itself exists, but is not directly reachable.
also from another website:
Quote:
The requested name is valid, but does not have an Internet IP address at the name server. This is not a temporary error. This means another type of request to the name server will result in an answer. For protocol and services resolution, the name or number was not found in the respective database. WSAHOST_NOT_FOUND for details.
How can I fix this? What other types of request might work? (and how do I do them?) Everyone can access the website fine through a web browser. Thanks EDIT: Would the problem be that for the proxy, I connect to wwwcache.domain.ext, but when not using the proxy I use http://mysite.org? So it fails with "http://". I can't test it now but I will later! [Edited by - xDan on November 28, 2006 6:22:07 AM]

Share this post


Link to post
Share on other sites
Advertisement
That's entirely possible - the name you pass shouldn't include the protocol. The address of your site is mysite.org, not http://mysite.org.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement