I'm currently trying to write a script that will connect through a secure proxy server to get a page (only accessible through the secure proxy)
I've writen the following script
$proxy = "xxxxxxxxxx";
$port = "xxxx";
$url = "http://xxxxxxxxxxx";
$conn = fsockopen($proxy, $port, $errno, $errstr, 5);
if (!$conn) {
echo "Error: ($errno)";
} else {
if (!fputs($conn, "GET $url HTTP/1.0rnHost:$serverrnrn"))
die ("Unable to send get request");
while (!eof($conn)) {
$results = fgets($conn,128);
$results = htmlentities($results);
echo $results;
}
fclose($conn);
}
When trying this code, i get the following error..
Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)
I'm sure I'm missing something simple. Any help would be appreciated.