Page 1 of 1

Environmental Variables

Posted: Sun May 30, 2004 12:11 pm
by biff
Hello,

I'm using a php script to download the source of a webpage: file('http://localhost/file.php');

That page I'm downloading (file.php) just shows the environmental variables for any browser accessing it. However when my script accesses it, most are blank, including the User Agent.

Is there a way to set the User Agent (and other variables) so that the page I hit would think it was hit by Internet Explorer?

Posted: Sun May 30, 2004 12:14 pm
by feyd
check into [php_man]curl[/php_man].. it fakes a browser..