Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 04-29-2003, 01:47 PM
LadyLarke's Avatar
LadyLarke LadyLarke is offline
Baby Croc
 
Join Date: Apr 2003
Location: Toronto, Ontario. Canada
Posts: 57
Default

Looking for a working script that counts how many times a file has been downloaded.

You've seen them everywhere. How many times someone downloaded some cgi script or mp3 file etc. What I seek is the same thing. A simple textual indicator that x.zip file has been downloaded x times. But I'd like to put that information beside where the zip file is downloaded. I do not want the number of downloads to be generated on a new page. I hope this makes sense?

example:

This Zip has been downloaded 5 times.
__________________
LadyLarke
Cattery-Index.com
Reply With Quote
  #2  
Old 04-29-2003, 04:04 PM
GatorBrent's Avatar
GatorBrent GatorBrent is offline
HostGator Staff
 
Join Date: Oct 2002
Location: houston, texas
Posts: 3,006
Default

Hmm have no idea. Does anyone know? If nobody replies here try asking on www.webhostingtalk.com and while you're there feel free to give us a review.
__________________
Gators love marshmallows.
Reply With Quote
  #3  
Old 04-30-2003, 12:26 PM
CRySSiS's Avatar
CRySSiS CRySSiS is offline
Baby Croc
 
Join Date: Oct 2002
Location: Canada
Posts: 99
Default

A few minutes searching on Google turned this up as the best posible solution I found:
http://www.datatrendsoftware.com/countdown_lite.html

That what you are looking for?

If not:
http://www.perlmasters.com/categorie...nloading.shtml
__________________
If the world was free, I would still be poor.
Reply With Quote
  #4  
Old 04-30-2003, 01:58 PM
skarekrow skarekrow is offline
Hatchling Croc
 
Join Date: Apr 2003
Location: wichita, ks
Posts: 10
Default

You might want to try http://www.hotscripts.com

This might take you to where you want to be http://www.hotscripts.com/PHP/Script...nload_Systems/
Reply With Quote
  #5  
Old 05-04-2003, 04:18 PM
LadyLarke's Avatar
LadyLarke LadyLarke is offline
Baby Croc
 
Join Date: Apr 2003
Location: Toronto, Ontario. Canada
Posts: 57
Default

it's likely I've tried all the above. But I will try one I wasn't sure about. Thanks for the input folks. I hope one of them works this time lol.

Shannon
__________________
LadyLarke
Cattery-Index.com
Reply With Quote
  #6  
Old 05-05-2003, 12:22 AM
LadyLarke's Avatar
LadyLarke LadyLarke is offline
Baby Croc
 
Join Date: Apr 2003
Location: Toronto, Ontario. Canada
Posts: 57
Default

Well I tried a couple of those and have seemingly exhausted all those options. Most scripts require you to have all your download files in one folder. Good grief I have 100's of files and just to try to keep things organized they are sorted in specific folders!

So, alternatively. How can I see what has been downloaded the most just for my personal knowledge. Forget showing the visitors. I just want to know how many times something was downloaded from my site.
__________________
LadyLarke
Cattery-Index.com
Reply With Quote
  #7  
Old 05-24-2003, 04:44 PM
plugged plugged is offline
Hatchling Croc
 
Join Date: May 2003
Posts: 11
Default

here's a PHP/MySQL solution

create a mysql table name 'LINKCOUNT' like this:

[code:1:d6136a70c8]
LID LCOUNT LFILE
[/code:1:d6136a70c8]

where LID is auto-increment and primary, LID and LCOUNT are integer values, and LFILE is a text value pointed to the address of the file..

add files like this..

[code:1:d6136a70c8]
LID LCOUNT LFILE
1 0 link1.zip
2 0 link2.zip
3 0 /myfiles/link3.zip
4 0 http://www.yahoo.com/file.zip
[/code:1:d6136a70c8]

then link them like so:
<a href="linkcount.php?id=3">link 3</a>

and have a page linkcount.php:
[code:1:d6136a70c8]
<?
$id = $_GET["id"];
$cid = mysql_connect("localhost","MYSQL_US R","MYSQL_PWD");
mysql_select_db("MYSQL_DB",$cid);
$result = mysql_query("UPDATE LINKCOUNT SET LCOUNT = LCOUNT + 1 WHERE LID = $id");
$result = mysql_query("SELECT LFILE FROM LINKCOUNT WHERE LID = $id");
$line = mysql_fetch_assoc($result);
$url = $line["LFILE"];
mysql_close($cid);

header("Location: $url");
?>
[/code:1:d6136a70c8]

change MYSQL_USR, MYSQL_PWD, and MYSQL_DB to your mysql username, password, and database.

to check your hit counts, just issue a SELECT LCOUNT FROM LINKCOUNT WHERE LID = $id

this can work with both links, and images.

a front end to this is easy to make..
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Login Script for cPanel Shane Pre-Sales Questions 10 11-02-2006 02:31 PM
[Closed] script problems amartins Shared Hosting Support 4 05-05-2004 07:19 AM
Reseller Question - shopping cart or script TMS Shared Hosting Support 0 02-09-2004 04:07 PM
Perl Script to Notify Cellphone of Email? dmacke Pre-Sales Questions 0 10-02-2003 04:09 PM

All times are GMT -5. The time now is 08:04 PM.