Hai
here is the code
can you find the bug in this code and rectify it.
thankz
<?php
$URL = "www.sanposoft.com";
$fp = fsockopen ($URL, 80, $errno, $errstr, 30);
if (!$fp)
echo "$errstr ($errno)\n";
else {
fputs ($fp, "HEAD /syncrx/test/Test.php HTTP/1.0\r\n\r\n");
$match = array();
while (!feof($fp)) {
$line = fgets($fp, 2280);
echo "Hello" . $line . "<br>";
if (preg_match('/Last-Modified: (.+)$/i', $line, $match))
break;
}
fclose ($fp);
if (count($match) > 0)
$date = $match[1];
else
$date = "UNKNOWN DATE";
// Note date time is in GMT, process further if you
// want local date time
echo $date . "\n";
}
?>