<?php
 
 
require_once('HTTPsock.class.php');
 
 
$socket = new HTTPSock();
 
 
/* Simple GET */
 
echo $socket->HTTPRequest("GET", "http://www.google.com/");
 
 
/* Advanced POST, use array's for overwriting header values and using POST variables */
 
$header = array("Referer" => "http://www.google.com");
 
echo $socket->HTTPRequest("POST", "www.google.com/someform.phtml", array("somevar" => "somevalue"), $header);
 
 
/* Returns the a cookie with the name 'somecookie' */
 
echo $socket->cookies['somecookie'];
 
 
/* Returns what the content was encoded in */
 
echo $socket->headers['Content-Encoding'];
 
 
?>
 
 |