The CURL library isn't part of the standard PHP install as far as I know...
Why don't use
file_get_contents? I don't know servers that have disabled the fopen wrappers....
Otherwise you can use:
code:
function get_page($host, $path, $get) {
$out = "GET /$path HTTP/1.1\r\nHost: $host\r\nConnection: Close\r\n\r\n";
$fp = fsockopen($host, 80, $errno, $errstr, 30);
$in = "";
fwrite($fp, $out);
$body = false;
while (!feof($fp)) {
$s = fgets($fp, 1024);
if ( $body )
$in .= $s;
if ( $s == "\r\n" )
$body = true;
}
fclose($fp);
return $in;
}