You need to open a socket and send the request.
Here's an example without any error checking. Set the obvious variables first, then...
$fp = fsockopen($server, $port);
fputs($fp, "HEAD $uri HTTP/1.0\r\n\r\n");
$response = fread($fp,4096);
If this is a name-based host, you will need to use HTTP/1.1 and send a more complex string.