All pastes #477696 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-05-08 20:14 UTC
rendered paste body
$fp = @fsockopen("[siteurl]", 80);
		if(!$fp){
			Error("File not found", "Unable to open file!");
		}
		$info = "HEAD ".$filename." HTTP/1.1\r\n";
		$info .= "Host: [siteurl]\r\n";
		$info .= "Connection: Close\r\n\r\n";
		fwrite($fp, $info);
		while(!feof($fp)){
			$line = fgets($fp, 128);
			if(eregi("last-modified:", $line)){
				$start = strpos($line, ":");
				$line = substr($line, $start+1);
				$downloadstime[$i] = trim($line);
			}
		}
		fclose($fp);