Is there a way I can enable programs to upload a certain amount of data. Basically I have auto-updating programs but I would like to monitor how many downloads that gets. I thought that whenever the program updates on a user's computer, it could send a small amount of data to somewhere and that would enable me to count the number of updates.
Is this possible? Would 'FTP' help? - I don't really know what FTP is, just what it stands for.
Alternatively, I could use a server that would allow me to monitor the number of downloads a file gets and then hat would tell me how many updates I have instead - however this is difficult to find on the internet as it doesn't really seem to be something advertised. If I was to go down this road, the website/server thing that I use would need to allow downloads to be accessed directly so downloads could be made without a browser (ie not needing to surf thought several pages or type in a code).
What do you think?
7 replies to this topic
#1
Posted 22 May 2011 - 03:50 AM
|
|
|
#2
Posted 22 May 2011 - 04:57 AM
Sending a simple HTTP request that indicates it updated would be fine, along with a receiving PHP script.
FTP is File Transfer Protocol, and is blocked by most companies.
If you're using IIS or Apache, you should have log files of what requests were made.
FTP is File Transfer Protocol, and is blocked by most companies.
If you're using IIS or Apache, you should have log files of what requests were made.
#3
Posted 22 May 2011 - 05:14 AM
I currently host the site (it's very small) using dropbox haha. If I use IIS or Apache I would need an always-on computer wouldn't I? Is there another way to set that up? I was thinking of hosting the site using LCN (Domain Names - Domains - UK Domain Name Specialists - LCN.com) as the suppl my current domain name and allow web forwarding. Perhaps thy would have a feature such as this?
Another issue is I am not sure how to sen an HTTP quest without launching the browser. I was thinking of setting up a goo.gl link as this would monitor the number of times that link has been accessed; the goo.gl link would redirect to a page which would give a message about the new update and what new features are included. I do not really want to do this though, as I would prefer to be more discreet and not launch the browser.
Another issue is I am not sure how to sen an HTTP quest without launching the browser. I was thinking of setting up a goo.gl link as this would monitor the number of times that link has been accessed; the goo.gl link would redirect to a page which would give a message about the new update and what new features are included. I do not really want to do this though, as I would prefer to be more discreet and not launch the browser.
#4
Posted 22 May 2011 - 05:22 AM
I built-in function to the language I use downloads a URL to a file. Could this type of request be monitored? I tried it using goo.gl; although it would download the file, goo.gl id not count any new clicks, so I could not use this method to keep track of downloads.
#5
Posted 22 May 2011 - 05:33 AM
The request can be monitored by your server software, if you are using real software such as Apache or IIS. Dropbox probably doesn't count, but you would need to check their forums to be sure.
#6
Posted 22 May 2011 - 06:06 AM
But, would I need to have an always-on computer to host the website on if I used the server software? I am worried about my service provider and my own bandwidth (I already get relatively low speeds) and the fact that my PC isn't always on. So I don't think that is really practical for me, I would need to host it somewhere with LCN.
Edited by sAuhsoj, 22 May 2011 - 01:09 PM.
#7
Posted 22 May 2011 - 06:18 PM
You would need it to be always on when you want the files to be available. You would just have to change your software, not necessarily your network connection.
#8
Posted 22 May 2011 - 07:30 PM
It all depends on what you want to do. The most simple way however that will be more reliable than self hosting in the end is to sign up for a free PHP host (there are many out there), and host a PHP script of which will redirect the user to the dropbox file after you record their download attempt.
This should work fine with your language by pointing it to the PHP file as long as it follows the redirect.
A working and simple example recording their IP address and time of download before redirecting:
Or of course replace logging with the number of downloads (feel free to post in our PHP section and ask how to do this if you wish)
This should work fine with your language by pointing it to the PHP file as long as it follows the redirect.
A working and simple example recording their IP address and time of download before redirecting:
<?php
//Record download, appending a string to a log
file_put_contents("log.txt", $_SERVER['REMOTE_ADDR'] . " had downloaded the file at " . date("F j, Y, g:i a") . PHP_EOL, FILE_APPEND);
//Download the file (this is just an example)
header("Location: http://mirror.internode.on.net/pub/test/1meg.test");
ob_clean();
flush();
exit();
?>
The script would then write to a file log.txt:<their IP> had downloaded the file at May 23, 2011, 3:29 am <their IP> had downloaded the file at May 23, 2011, 3:40 am <their IP> had downloaded the file at May 24, 2011, 3:41 am
Or of course replace logging with the number of downloads (feel free to post in our PHP section and ask how to do this if you wish)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









