Jump to content

Does anyone know anything about web fetching


fbrown

Recommended Posts

<?php
$file = file_get_contents('http://yoursite.com');

$tables = split("<table", $file);
echo '<pre>';
foreach ($tables as $table) {
   echo 'Start of table ' . $table . "\n<br />";
}

?>

 

If you want parts of the page you simple use the strpos, or preg_match functions to parse out the data.

 

www.php.net/split

www.php.net/explode

 

Those may also prove to be helpful.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.