Environmental Variables

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
biff
Forum Newbie
Posts: 1
Joined: Sun May 30, 2004 12:11 pm

Environmental Variables

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

check into [php_man]curl[/php_man].. it fakes a browser..
Post Reply