World Population

Similar to the US population example this is the world population figure.

 

<?php
$url = “http://www.census.gov/ipc/www/popclockworld.html“;
$fp = fopen($url, “r”);
$search = fread($fp, 32000);
fclose($fp);
$search = ereg(“<div id=\”worldnumber\”>(.*)</div><p></p>”, $search, $content);
echo “<h2>World Population</h2>”;
echo “<br>$content[1]<br>”;
?>

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*