$remote = "your.server.address.ordomain";
$proto = 8003;
//echo "Remote Host is: $remote<p>";
$service_port = getprotobyname('tcp');
$address = gethostbyname($remote);
$socket = socket(AF_INET, SOCK_STREAM, $service_port);
echo "socket has connected<p>";
$try = connect($socket,$address, $proto);
$Command = "What you want sent through the socket here\r\n";
$result = '';
//Read and Write thorugh socket.
write($socket, $Command, strlen($Command));
Ok how this works is it opens up a connection based on port, which i have set at 8003 but can be any (should be 80 or 443 in your case). The rest of the stuff is pretty standard socket connection stuff. The $Command would be a string array comma deliminated or any other type of format to be sent through the socket. The write command then writes the value of $Command through the socket. The read command reads what is sent back through the socket and stuff it into the $result variable.
In the result variable is where you would be able to strip out values that you don't want and display the data how you want it to be displayed. I hope this helps ya get started anyways.