US population example

 

<?php
//the address with the figures, this may change in the future
$url = “http://www.census.gov/population/www/popclockus.html“;
$fp = fopen($url, “r”);
$search = fread($fp, 32000);
fclose($fp);
//the html that surrounds the figures we want, this may change
$search = ereg(“<div id=\”usnumber\”>(.*)</div></p>”, $search, $content);
echo “<h2>US Population</h2>”;
echo “<br>$content[1]<br>”;
?>

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*