Re: How can I read the output from a local php file [fopen()]?

From: Date: Mon, 14 Feb 2005 18:17:16 +0000
Subject: Re: How can I read the output from a local php file [fopen()]?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-208671@lists.php.net to get a copy of this message
Al wrote: > I have a script that needs to read the output, not the file itself, from a > local > php file using its absolute address. > > Normally I'd simply use $handle= fopen(http://www.whatever.com, 'rb') > > However, the webhost [Powweb] just changed their system to use "load > balancing" > servers. Now, my script must use the fopen() with a hack as such: > > $handle= fopen(http://local.whatever.com, "rb") > > But, but, it doesn't work when my script is started from a cronjob, only > from a > remote browser. It's hard to imagine how PowWeb could have DNS local.whatever.com resolve OK in PHP, but not from cron... In a shell prompt, what does: nslookup local.whatever.com dig local.whatever.com ping local.whatever.com tell you? Can you use wget to download the URL? It really sounds to me more like a question for PowWeb than us... I mean, only they can tell you what they've done to hack their DNS like that. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#208671) next »