18
6
I have a few questions, please help:
Fist, I can access Google search just by typing http://74.125.224.211
, because this is the IP address returned by nslookup.
However, I could not do so with the IP addresses returned from www.yahoo.com. How do I go to the Yahoo search page by its IP?
Another example, http://www.allaboutcircuits.com
will resolve to 68.233.243.63
by DNS server, but if I go to http://68.233.243.63
, I get "Hello world!".
Second, for some reason, there is something wrong with DNS resolvers with my web hosting service (it will not be fixed !!). So commands like
get_file_contents("http://www.allaboutcircuits.com");
will return php_network_getaddresses: getaddrinfo failed: Name or service not known
How do I get around this with IP address,
68.233.243.63
I mean, somehow attach the HTTP hostname parameter to get_file_contents()
?
I would like to solve this on my own side (in my code), no troubleshooting/adjustment will be done by the server admin.
9
Read about virtual servers and how a single host is able to host many websites.
– wallyk – 2012-09-14T23:30:21.307I assume there's some reason you can't just use the domain name? – Isaac Rabinovitch – 2012-09-15T03:09:40.363
@Isaac Rabinovitch: user1502776 says "there is something wrong with DNS resolvers with my web hosting service (it will not be fixed !!)" and "I would like to solve this on my own side (in my code), no troubleshooting/adjustment will be done by server admin." – Bavi_H – 2012-09-15T03:51:23.057
3If your server admin is that stupid, you need to go find a different web hosting provider. – Michael Hampton – 2012-09-15T07:30:44.113