View Full Version : Please help, I'm driving mad !

01-26-2004, 11:35 AM
Ok. That's simple. Here it is

$result = shell_exec("wget -q -O - 'http://www.google.com'");
echo $result;

That's supposed to print on the standard output the source code of the web page http://www.google.com. Note I can't use fopen function because I'm behind a firewall.

Well the script works from the terminal, but it doesn't work with apache !! It doesn't display anything !!

Thanks for help !!

01-26-2004, 01:12 PM
Does the server you are trying this on have this ability enabled? I mean you could of course use something else which would wreak havok in that string and as such it may be disabled??

01-26-2004, 02:56 PM
Have you tried using fsockopen through your proxy server (if you have one)??? I did that to pull in RSS feeds through a firewall.