How do I customize the User-Agent when opening a remote file?
| From: | Dallas Thunder | Date: | Thu, 15 Aug 2002 01:38:12 +0000 |
| Subject: | How do I customize the User-Agent when opening a remote file? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112724@lists.php.net to get a copy of this message | ||
How do I customize the User-Agent when using fopen() or file() to open a
remote file?
PHP use "PHP/4.2.3-dev" on my system as the User-Agent when I using file()
function to retrive a remote file. Howerver, some servers will refuse to
serve browsers other than Mozilla compatible and return a 403 code. Is
there any method to let me define User-Agent for my own? Thanks!