php table for download counter
Posted: Sat Jul 17, 2004 9:53 pm
feyd | Please use
if you know wut i can put in to do that please let me know,
thanx humpy
feyd | Please use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
hey i have this download counter and there is a table in it for the stats, i was wondering if someone knew wut code i could use to make the table show the counter stats in order from highest to lowest downloads
here is the code hereCode: Select all
}
if($action=="show_stats"){
echo "<style>TD { FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana }</style>";
echo "<FONT SIZE=3 COLOR=#000000 face=georgia><CENTER><B>Unique Downloads Counter</B></CENTER></FONT><BR>";
$handle = @opendir("download");
echo "<table cellspacing=0 align=center border=1 bordercolor=#000000 ><td align=center>Filename</td><td align=center>URL</td><td align=center>Count</td><td>Counting since</td>";
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." ) {
$fn=fopen("download/".$file,"r");
$statis=file("download/".$file);
$stat=explode("|", $statis[0]);
fclose($fn);
if($stat[2] != "0"){
echo "<tr><td>$stat[2]</td><td><a href='$stat[1]' target=_new>$stat[1]</a></td><td align=center>$stat[0]</td><td>$stat[4]</td></tr>";
}
}
}
closedir($handle);
echo "</table><hr color=#000000 width=50%>";
}if you know wut i can put in to do that please let me know,
thanx humpy
feyd | Please use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]