View Single Post
Old 10-19-2007, 07:22 PM  
qw12er
Confirmed User
 
Join Date: Apr 2004
Location: Montreal
Posts: 799
:stoned PHP Guru - need your help

How can I force an HTTP GET request through a proxy server with PHP ?

Right now I use this function to send my info :
function myPost($URL, $script, $data){

$sock = fsockopen($URL, 80, $errno, $errstr);
fputs($sock, "GET ".$script." HTTP/1.0\r\n");
fputs($sock, "Host:".$URL."\r\n");
fputs($sock, "Content-type: application/x-www-form-urlencoded\r\n");
fputs($sock, "Content-length: " . strlen($data) . "\r\n");
fputs($sock, "Accept: */*\r\n");
fputs($sock, "\r\n");
fputs($sock, "$data\r\n");
fputs($sock, "\r\n");
fclose($sock);
}

Thanks for any help !
__________________
I have nothing to advertise ... yet.
qw12er is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote