All pastes #69125 Raw Edit

Mine

public text v1 · immutable
#69125 ·published 2006-06-22 15:28 UTC
rendered paste body
<?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.ee.net/');
curl_setopt($ch, CURLOPT_HEADERFUNCTION, 'read_header');
curl_setopt($ch, CURLOPT_WRITEFUNCTION, 'read_body');
curl_exec($ch);

if ($error = curl_error($ch)) {
    echo "Error: $error<br />\n";
}

function read_header($ch, $string)
{
    $length = strlen($string);
    $head = "$string";
    echo $head;
    return $length;
}


function read_body($ch, $string)
{
    $length = strlen($string);
    $body = "$string";
    echo $body;
    return $length;
}
?>