Im pretty good at PHP but i want to learn more about Web Fetching, Im just wondering if anyone know's any good sites that aid you with Web Fetching and help you learn the in's and out's of it.
i'm assuming you mean getting the php script to copy out the content of a url and parsing through the contents...
try this out:
<?php
$url = "http://www.yoursite.com";
$filepointer = fopen($url,"r");
if($filepointer){
while(!feof($filepointer)){
$buffer = fgets($filepointer, 4096);
$file .= $buffer;
}
fclose($filepointer);
} else {
die("Could not create a connection to yoursite.com");
}
// at this stage, the contents of http://www.yoursite.com is
// in the $file variable. you can process it using PHP's string
// functions.
?>
Comments
try this out:
[php]
$url = "http://www.outpostgamers.com/images/header.jpg";
if(copy($url, "images/header.jpg")){
echo "File copied";
}
[/php]
It works, they're might be an error but you get the idea...