Useragent and file
| From: | Todd Pasley | Date: | Fri, 30 Aug 2002 08:19:28 +0000 |
| Subject: | Useragent and file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-114616@lists.php.net to get a copy of this message | ||
Hi
Im using file() to get the contents of a webpage. e.g
// get a web page into an array
$fcontents= file ($targeturl);
However I dont know how to mimic a different useragent. Using LWP::UA (in perl) i can pretend to be
iexplore6 running on win2k or anything i want.. Is there a way i can do this in PHP?
By changing the useragent will this also resolve problems with javascript?, I'd like the target
server to think that I can view/run it.
Thanks heaps,
Todd.