grab page from the web using PHP
<?php
//hmm. this may require removing the surrounding html...
function getURLpage($host="www.google.com", $path="/") {
$buffer="";
$fp=fsockopen($host, 80);
fwrite($fp, "GET $path HTTP/1.0\r\nHost: $host\r\n\r\n");
while (!feof($fp)) {
$buffer .= fread($fp, 4096);
}
fclose($fp);
return $buffer;
}
?>
or you can simply use the php function $content_string = http_get("http://www.google.com")
f ro doing ftp, look into ftp_get() in the PHP documentation for ftp_get (you can't just use it like http_get()