Hi there! I'm using Ed Willians'HTTP Connection Class, and I'm having some problems. I tried his example :
include("class.HttpConnection.inc");
$headers[] = new HTTP_Header("Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, /");
$headers[] = new HTTP_Header("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95😉");
$headers[] = new HTTP_Header("Host", "www.php.net");
$headers[] = new HTTP_Header("Referer", "");
$req = new HTTP_Request("GET", "/index.html", "HTTP/1.0", $headers);
$con = new HTTP_Connection("www.php.net");
$con->Connect(); // open a connection to server
$con->Request($req); // send request
$con->Response($res); // creates a response obj read from server
$con->Close(); // close connection to server
echo $res->GetEntityBody();// echo entity body from response (file contents)
but nothing happens, I receive an empty page, not the php.net page as expected.
Any suggestions?