Forum Moderators: coopster
I am trying to handle the return value of fopen()..
Now here's the problem - I can't access the page myself by browser so I cant simply print it out. The page is set to only accept 3 IP adresses, of which none are mine.
I tried this :
$afile = fopen("logfile.log","w");
$fp = fopen("http://www.example.com?something=anything","r");
fwrite($afile, var_dump($fp));
fclose($afile);
fclose($fp);
Then after that I can FTP the logfile and check it's content for any eventuall errors or return values. But it does not work, I dont know why?
Any ideas. How do I write the content of $fp to a file?
What you can do is log the error reporting as well. More you can find here:
[de.php.net...]
and more about the fopen:
[de.php.net...]
Hope this helps
Michal
Thus print the return of fopen() in a file called "logfile.log" or whatever.
The thing is I understand fopen() dont just return errors but any sort of messages that the reciever want to sent, is this wrong?
I do have access to the site in whole with no restriction.
Does the server happen to have FTP that you have access to as well? If so, maybe PHP's FTP Functions [us2.php.net] will be of some help. If you did not give yourself permissions to access the website with PHP, then fopen isn't going to work.