Re: Using proxy servers with fsockopen()
| From: | Plamen Slavov | Date: | Fri, 06 Apr 2001 06:08:00 +0000 |
| Subject: | Re: Using proxy servers with fsockopen() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47406@lists.php.net to get a copy of this message | ||
try this
$desired_agent="User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)\n";
$datei = fsockopen($proxyaddr, $proxyport, &$errno, &$errstr,30);
if( !$datei )
{
echo "proxy not available !";
fclose($resultfile);
}
else
{
fputs($datei,"GET $filewanted/ HTTP/1.0\n");
fputs($datei,$desired_agent);
fputs($datei,"\n");
while (!feof($datei))
{
$zeile = fgets($datei,1000);
echo "$zeile";
}
}
----- Original Message -----
From: "Vlad" <vlad@zircon.net.ua>
To: <php-general@lists.php.net>
Sent: Friday 06 April 2001 г. 9:18 AM
Subject: [PHP] Using proxy servers with fsockopen()
Hi all
Is any way to open socet connections using proxy servers from php script?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net