http_user_agent and proxy
| From: | Plamen Slavov | Date: | Fri, 09 Feb 2001 08:21:00 +0000 |
| Subject: | http_user_agent and proxy | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-38915@lists.php.net to get a copy of this message | ||
Hi guys,
I have this problem:
I am using a script like this to make php use a remote proxy to get pages using a remote proxy:
$data1 = fsockopen($proxy, $port, &$errno, &$errstr);
if( !$data1 )
{
echo "proxy not available !";
fclose($resultfile);
// exit();
}
else
{
fputs($data1,"GET $myfiles/ HTTP/1.0\n\n");
while (!feof($data1))
{
$mydata = fgets($data1,1000);
echo "$mydata";
}
}
The problem is that i want to set the HTTP_USER_AGENT to something different than a blank field, but
have no idea how to do that.