PHP count insertion

Posted by Old Rabbit on Tue, 04/19/2005 - 18:31Blog plugins

This snippet lists the download count on a php page:

<?php

$url = fopen ("http://www.spreadfirefox.com/download_counter.php?ff=1", "r");

$info = fread($url, 1000);

$off = strpos($info, 'Spread Firefox');

$start = strpos($info, '<description>', $off) + strlen('<description>');

$stop = strpos($info, '</description&gt', $off);

$outstr = substr($info, $start, ($stop - $start));

fclose($url);

echo $outstr;

?>