Xable Posted July 16, 2005 Share Posted July 16, 2005 Well as title says, i have a free DLL download site and i want to count the number of downloads for each file. Is this possible? Link to comment Share on other sites More sharing options...
Xable Posted July 17, 2005 Author Share Posted July 17, 2005 dman, you know your stuff. is it possible... Link to comment Share on other sites More sharing options...
liquidplasmaflow Posted July 17, 2005 Share Posted July 17, 2005 You could use a system where the user clicks a PHP script to download, the script does counter++, and then the script sends the file. Link to comment Share on other sites More sharing options...
dman Posted July 17, 2005 Share Posted July 17, 2005 (edited) try this cgi script, caveman.http://www.utilmind.com/scripts/downloadcounter.html. looks like you just need to alter your links a little to point to the script.I like liquidplasmas idea for php.call the script with a ?get parameter of the url of file from your table link.then you could do a redirect something like this<?php// Redirect to the link URL$url="files/mydll.dll";Header("Location: $url")?> you can add some code to either increment a download count to a file or db. I wouldn't mind having this for my site as well, so I will try to help if you want to try it this way Edited July 17, 2005 by dman Link to comment Share on other sites More sharing options...
Xable Posted July 18, 2005 Author Share Posted July 18, 2005 carefull who you are calling caveman, i`ll hunt you down and eat you for dinner. that cgi script looks ok but liquidplasmaflow PHP script idea is interesting, even though i don`t understand PHP. I`m going to go through this tutorial tomorrow.BTW is your site the one in your sig? Link to comment Share on other sites More sharing options...
liquidplasmaflow Posted July 18, 2005 Share Posted July 18, 2005 http://www.hotscripts.com/Detailed/33867.html <-- Try that. And to whose sig are you referring? Link to comment Share on other sites More sharing options...
dman Posted July 18, 2005 Share Posted July 18, 2005 (edited) Nice find, lpf. This is similar to what I was proposing, passing the download url to a php script as a get parameter."Neanderthal" (sorry, didn't realize cavemen, er, hominids were so touchy.) Go club some chick over the head and drag her back to your cave by her hair, that always makes you feel better! If you are referring to the link in MY sig, then no. I wish I was talented enough to write dabo. This project is created in Python by former Foxpro guru Ed Leafe. I learned a lot about Foxpro from him, but because MS is trying to kill it the foxpro community is moving on. I think I am doing well when I can figure out how to USE Ed's code.this is My Site. Dont laugh, it is work in progress and I am no graphics artist. The freeware page and submission form are PHP/MySQL scripts. I am most proud of getting fixed menu frame to work in IE using CSS. Curse IE and its crappy CSS implementation, I only hope they can do better with IE7.I am out of town till thursday. Read the tutes and if you still need help at end of week feel free to post or PM. Edited July 18, 2005 by dman Link to comment Share on other sites More sharing options...
Xable Posted July 18, 2005 Author Share Posted July 18, 2005 (edited) http://www.hotscripts.com/Detailed/33867.html <-- Try that. And to whose sig are you referring?<{POST_SNAPBACK}>You are the master script finder, thank you i will give it a go, dman refered to his site earlyer i was wondering if that was it in his sig."Neanderthal" (sorry, didn't realize cavemen, er, hominids were so touchy.) Go club some chick over the head and drag her back to your cave by her hair, that always makes you feel better! thumbup.gifLOLyour site looks ok, though in the second paragraph "your" should be "you" Thanks for your help Edited July 18, 2005 by Neanderthal Link to comment Share on other sites More sharing options...
dman Posted July 18, 2005 Share Posted July 18, 2005 Thanks for the proofread. Swear I read it 100 times. Good luck, I am signing off til thurs eve. have fun!dman Link to comment Share on other sites More sharing options...
matrix0978 Posted July 18, 2005 Share Posted July 18, 2005 (edited) Wow, havent been in MSFN in a while. But I DID have a tutorial on this. I willl try and find it again and post it here. EDIT:I couldnt find my tutorial on it so i just did some research.http://www.phpfreaks.com/quickcode/download_counter/230.phphttp://www.phpjunkyard.com/php-click-counter.php Edited July 18, 2005 by matrix0978 Link to comment Share on other sites More sharing options...
Xable Posted July 22, 2005 Author Share Posted July 22, 2005 matrix0978, have you thought of writing that tutorial out again, it would be realy usefull for me, and others i think.I`m trying http://www.hotscripts.com/Detailed/33867.html but can`t get it to work properly. I can link to a file in the specified download folder but it won`t work if i link to a file that is in a folder inside the specified download folder.Also i can`t figure out how to view the download statistics. Any help appreciated. it`s got me Link to comment Share on other sites More sharing options...
Xable Posted July 23, 2005 Author Share Posted July 23, 2005 my download folder is called "dll" so i have set the variable in download.php like this,$FILES_DIR = "/dll/";and my links are therefore,href='download.php?file=A3D.RAR'but if i try to link to a file inside a sub folder inside my download folder. eg,#/dll/A/A3D.RARthe linkhref='download.php?file=/dll/A/A3D.RAR'orhref='download.php?file=/A/A3D.RAR'won`t work.Is there any way to make this work or can i only link to files in the root of my specified download folder? Link to comment Share on other sites More sharing options...
dman Posted July 23, 2005 Share Posted July 23, 2005 Hi B.C. Instead of hard-coding the $FILES_DIR variable, pass it as another get parameter, like this..href='download.php?file=A3D.RAR&filedir=A' in the download script, set it like this...$FILES_DIR = $_GET['filedir']; Link to comment Share on other sites More sharing options...
Xable Posted July 23, 2005 Author Share Posted July 23, 2005 (edited) dman, you are hilarious thanx, doesn`t seem to work though. Edited July 23, 2005 by Neanderthal Link to comment Share on other sites More sharing options...
dman Posted July 23, 2005 Share Posted July 23, 2005 (edited) sorry, you need to still add the backslashes and the rest of your path to the string. Somrething like$FILES_DIR = "/dll/" . $_GET['filedir'] . "/"; Edited July 23, 2005 by dman Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now