url with DNS name as a parameter to function file_get_conten

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ajk
Forum Newbie
Posts: 1
Joined: Thu Oct 23, 2008 5:05 am

url with DNS name as a parameter to function file_get_conten

Post by ajk »

Hi All,
I am calling function

$tmp = "http://someDNS.com";
file_get_contents($tmp);



where someDNS.com is defined in hosts file of server.

but it is not working but when i give ip address insteed of someDNS.com it works.


can any one help me to come out from this problem ...
is it compulsory to pass ip url to this function???


please reply ASAP ... i am waiting for your reply
Post Reply