All pastes #964360 Raw Edit

Mine

public php v1 · immutable
#964360 ·published 2008-03-31 04:22 UTC
rendered paste body
<?require_once "PEAR.php";require_once "HTTP.php";// get the domain name to run HTTP::head on$filename = "/usr/home/digs/liqme/head.temp";$handle = fopen($filename, "r");$domain = fread($handle, filesize($filename));fclose($handle);// trim trailing whitespace$domain = trim($domain);// run the head command$result = HTTP::head("http://$domain");// output the resultsif (PEAR::isError($result)) {    echo "Error: " . $result->getMessage();} else {echo "<pre>";$data = var_dump($result);echo "</pre>";    foreach ($data as $key => $val){    $text .= $key . ": " . $val . "\n";}$temp_data = "head.txt";$fh = fopen($temp_data, 'w') or die("can't open file");fwrite($fh, $text);fclose($fh);}?>