Checking download links
Posted: Mon Jun 28, 2010 10:20 pm
I have a music site: http://alrightsounds.com/
I use C++ software I wrote to compose/arrange songs in 7 to 60 tone Just Intonation. I have around a thousand songs on the site now and I am preparing to upload another 170 or so.
In order to check user statistics about what songs are downloaded I use the PHP header function to link to some PHP code that checks for bots, then writes the name of the download to a text file. Periodically, I download the text file and run a Perl program for analysis.
My problem is I can't figure out a way to automatically check the download links. If the file is not there, the PHP interpreter on the server downloads a warning message with the file name. A link check sees that a file has been downloaded and claims the link is not broken.
I know I could change the links to plain HTML and download the raw stats from the ISP, then run a Perl program for analysis, but I'm looking for something that's less work, and doesn't involve downloading a lot of data of no interest to me.
Any suggestions?
Thanks,
Marion
I use C++ software I wrote to compose/arrange songs in 7 to 60 tone Just Intonation. I have around a thousand songs on the site now and I am preparing to upload another 170 or so.
In order to check user statistics about what songs are downloaded I use the PHP header function to link to some PHP code that checks for bots, then writes the name of the download to a text file. Periodically, I download the text file and run a Perl program for analysis.
My problem is I can't figure out a way to automatically check the download links. If the file is not there, the PHP interpreter on the server downloads a warning message with the file name. A link check sees that a file has been downloaded and claims the link is not broken.
I know I could change the links to plain HTML and download the raw stats from the ISP, then run a Perl program for analysis, but I'm looking for something that's less work, and doesn't involve downloading a lot of data of no interest to me.
Any suggestions?
Thanks,
Marion