[Solved] Count Downloads?

20 posts Page 1 of 2
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

[Solved] Count Downloads?
Dummy1912
Hello Guys,

Don't worry i know how this works :D
but what i don't know how can i show the current download integer
in to the label:

i save the count integers into a text file
now i like to know how to show it into a label:
Downloaded already: here comes the integer

example:
Downloaded : 2

thanks
Dummy1912
Last edited by Dummy1912 on Sun Jul 17, 2011 10:38 am, edited 1 time in total.
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Zulf
Serious Programmer
Serious Programmer
Posts: 441
Joined: Fri Jun 11, 2010 7:46 am

Re: Count Downloads?
Zulf
Use the System.IO namespace. You need to read the text file and convert the used pieces into an integer and display that.
Image
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Count Downloads?
Dummy1912
Zulf wrote:
Use the System.IO namespace. You need to read the text file and convert the used pieces into an integer and display that.
Hi Zulf,
sorry I'm not using vb for this
i need it in a html itself :D
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Bogoh67
VIP - Site Partner
VIP - Site Partner
Posts: 656
Joined: Sun Apr 18, 2010 8:20 pm

Re: Count Downloads?
Bogoh67
hmm im not much into HTML but umm im guessing after a download has finished
add it somewhere in your code sort of like My.settings in vb and by add it i mean have an integer Then + 1 it, but then again im guessing
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: Count Downloads?
Agust1337
I think he means like getting the download counts of a website such as:
File: chrome.exe
Downloads: 54

and then his program retrieves the number 54.

Am I right?
Top-notch casual Dating
User avatar
Bogoh67
VIP - Site Partner
VIP - Site Partner
Posts: 656
Joined: Sun Apr 18, 2010 8:20 pm

Re: Count Downloads?
Bogoh67
well if the download url is static there may be a way...
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Count Downloads?
Dummy1912
Hey Agust,

yea you are 100% right :D
Bogoh67 wrote:
well if the download url is static there may be a way...
do you know a way? please
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Bogoh67
VIP - Site Partner
VIP - Site Partner
Posts: 656
Joined: Sun Apr 18, 2010 8:20 pm

Re: Count Downloads?
Bogoh67
Dummy1912 wrote:
Hey Agust,

yea you are 100% right :D
Bogoh67 wrote:
well if the download url is static there may be a way...
do you know a way? please
so do you have one static download url? or do you have multiple or unlimited?
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Count Downloads?
mandai
You could use a server side PHP script to keep track of the downloads, then you can use a meta tag to redirect to the file:
Code: Select all
<meta http-equiv="refresh" content="2; url=file.zip">
<?php

$count = file_get_contents("counter.txt") or die("could not read counter.txt");
echo $count . " downloads so far";
$count++;
file_put_contents("counter.txt", $count) or die("could not write counter.txt");

?>
User avatar
Zulf
Serious Programmer
Serious Programmer
Posts: 441
Joined: Fri Jun 11, 2010 7:46 am

Re: Count Downloads?
Zulf
Dummy1912 wrote:
Zulf wrote:
Use the System.IO namespace. You need to read the text file and convert the used pieces into an integer and display that.
Hi Zulf,
sorry I'm not using vb for this
i need it in a html itself :D
Oh no it's my bad I didn't check what section this was in. Carry on.
Image
20 posts Page 1 of 2
Return to “Help & Support”