How to count Downloads

Started on the old forum in June 2011 · view the original in the archive · old links redirect here

#how-to-count-downloads

6 replies · 416 views · started 15 years ago · 1 min read

4 participants
Ahzan3 Newbie · 8 posts #1

Theres is a file on an HTML page I want to show users that how much time that file was downloaded? any one know this code,script or any type of method please post here..

MadHatter Junior · 14 posts #2

i can code that easily for a lava script

Ahzan3 Newbie · 8 posts #3

Can u please post it here?

MadHatter Junior · 14 posts #4
 
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM iw_comup WHERE fileid='".$fileid."'"));
echo "$noi";

this is a demo which selects this file from a databse table to show how many times it was counted

echo "<b>Viewed/Downloaded:</b> $noi[9] times <br/>";
mysql_query("UPDATE iw_comup SET dcount=$noi[9]+1 WHERE filename='".$file."'");
echo "<a href=\"$ucdir/$file\">Download this file</a><br/><br/><br/>";

note this is just a demo example $noi[9] is selecting the table name +1 is updating the download count by 1

Ahzan3 Newbie · 8 posts #5

Thanks...can u please also write an html code for counting clicks on a page, like My website haves a page called Mobile Area, I want to show users that how much time that page was clicked..

ozziemale31 Lead · 861 posts #7

well u can using php and html like

<?php

/////////////////script load time
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$start = $time;
//////////////////Includes
include("config.php");
include("core.php");
/////////////////Page headers

echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";

?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>yourdomain.com</title>
<meta name="description" content="yourdomain.com" />
<meta name="keywords" content="free, ringtones, download, mp3, tones, nokia, wap portal, chat, themes, games,wap hosting, mp3 tones, midi ringtones, themes, wallpapers, opperator logos, full 3gp videos, 3gp, chopper, prodigits, free scripts" />
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="icon" href="images/favicon.gif" type="image/gif" />

<?php
$bcon = connectdb();
$sid = $_GET['sid'];
echo gettheme($sid);
getbrip($sid);

?>
</head>
<body>

<?php
///enter php functions here
?>
</body>
</html>

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close