Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Site design: Counting the number of downloads?
#1
How I could count the number of downloads for each source I put in my site?
Antoni
Reply
#2
Learn Perl and JavaScript. With those two scripts working together, you can make any kind of counter.
Perl is the most-used CGI script, and JavaScript...You know what JavaScript is :wink:
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#3
javascript can't be used, but perl or php (or asp, or any cgi script for that matter). but it's hard to say if lycos supports cgi (and i doubt it).
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#4
Thanks all:
I see i must learn PHP! Lycos supports it (Nathan has a forum at Qbsux, I imagine it's php)
I just installed a local server and run my first hello.php...
Seems interesting :bounce:
Warning: wizardlife and I will flood this forum with questions!
Antoni
Reply
#5
My idea was

Code:
<a href="download.zip><?php add-to-counter script ?></a>

But I don't know. I'm new at php as well.
Reply
#6
Quote:javascript can't be used...
I meant Javascript AND Perl. Together.
Perl could be used alone. But if you know JavaScipt, why not? Smile
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#7
Quote:a href="download.zip><?php add-to-counter script ?></a>

I use

Code:
<a href="get.php?thefilenamewitoutdotzip></a>

http://dascdev.net
I use that coundet, assuming that is the link, im just guessing..
edit: it works!
b]Hard Rock[/b]
[The Stars Dev Company] [Metal Qb flopped] [The Terror]
Stop Double Posts!
Whats better? HTML or Variables?
Reply
#8
i would use the following, though I think this code could be wrong:

http://www.mysite.com/download.php?filen...lename.zip

Code:
<?php
$handle = fopen($filename, "r");
while (!feof ($handle)) {
    $buffer = fgets($handle, 4096);
}
fclose ($handle);

$buffer++;

$handle = fopen($filename, "a");
fwrite ($handle, $buffer);
fclose ($handle);

header("Location: http://yoursite.com/downloads/$filename");
?>
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#9
Quote:Thanks all:
I see i must learn PHP! Lycos supports it (Nathan has a forum at Qbsux, I imagine it's php)
I just installed a local server and run my first hello.php...
Seems interesting :bounce:
Warning: wizardlife and I will flood this forum with questions!

And I, will flood this forum with Frontpage questions. LOL
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#10
Quote:How I could count the number of downloads for each source I put in my site?

PHP 8)

www.phpfreaks.com >>> tutorials, scripts [paid and some free] and more!

If you can't find what you need than I will write you a php script and add it to our database 8)
url=http://forums.containment-breach.net][Image: vampire_sig.jpeg][/url]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)