All pastes #398431 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-17 05:33 UTC
rendered paste body
<?php

$url = "http://localhost/Angel%201x01%20City%20of%20Angels.nsv";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
global $f;
$f = fopen("test.txt", "a");

curl_setopt($ch, CURLOPT_HEADERFUNCTION, "viewh");

function viewh($ch, $head)
{

fwrite($GLOBALS["f"], $head."!");


}

$jesus = curl_exec($ch);
fclose($f);

//Strangely the only thing written is "HTTP 200 OK\r\n!"
?>