Re: Tracking downloads of mp3 files
I tried Matt's method of using CFContent to serve the files to the user, and worked just like a charm - on my dev machine. I was able to not only do what I needed, and keep good stats and log of activity, but do some other cool stuff too like have the pages fed from a database instead of a static page, thereby allowing much easier updating of content etc. Good .. EXCEPT . It didnt work on my production machine. A shared host.At first I figured we had CFContent disabled, but Im assured that CFContent is NOT disabled for the site in question.Now i have to go back to the code, to look for what I might have got wrong somewhere along the line. Are there any 'gotchas' with CFCONTENT in a shared hosting environment i ought to look for? Failing that, I think since the app worked beautifully first time on my dev machine, the only possibility is that I forgot to upload one of the files or something REALLY dumb like that.Any other ideas? Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Mon, 2 Jan 2006 05:42:50 -0800 Matt Robertson [EMAIL PROTECTED] wrote: Use cfcontent to push the files to them. Then you can work whatever tracking code you want into the picture. http://mysecretbase.com/How_To_Display_Protected_Files.cfm -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228200 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Tracking downloads of mp3 files
Does your shared host use sandbox security? That could be a gotcha with cfcontent. What's the error your'e getting? On 1/3/06, Mike Kear [EMAIL PROTECTED] wrote: EXCEPT . It didnt work on my production machine. A shared host.At first I figured we had CFContent disabled, but Im assured that CFContent is NOT disabled for the site in question.Now i have to go back to the code, to look for what I might have got wrong somewhere along the line. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228202 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Tracking downloads of mp3 files
Thanks for your suggestion Deanna. We should be using sandbox, but arent. I only lease a part of this box, dont own it so I dont have a lot of control over that part of things, but I'm assured that CFContent isnt disabled at all. (Whichi is a whole 'nother issue, but for now all I'm wanting to work out is why this app doesnt work). The error is a really helpful page cannot be displayed, not a CF 'grey box' error message. Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 1/4/06, Deanna Schneider [EMAIL PROTECTED] wrote: Does your shared host use sandbox security? That could be a gotcha with cfcontent. What's the error your'e getting? ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228213 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Tracking downloads of mp3 files
Is your host running URLScan (assuming this is a windows server)? URLScan can block certain file types and leave you with ambiguous screens in the process... Just a thought. Jeff -Original Message- From: Mike Kear [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 8:54 AM To: CF-Talk Subject: Re: Tracking downloads of mp3 files Thanks for your suggestion Deanna. We should be using sandbox, but arent. I only lease a part of this box, dont own it so I dont have a lot of control over that part of things, but I'm assured that CFContent isnt disabled at all. (Whichi is a whole 'nother issue, but for now all I'm wanting to work out is why this app doesnt work). The error is a really helpful page cannot be displayed, not a CF 'grey box' error message. Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 1/4/06, Deanna Schneider [EMAIL PROTECTED] wrote: Does your shared host use sandbox security? That could be a gotcha with cfcontent. What's the error your'e getting? ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228228 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Tracking downloads of mp3 files
Mike, Another possible issue to consider, is the production server Windows or Linux? A Linux machine will be case sensitive to file and folder names, and won't allow spaces either. Another simple test you might (and probably should) use: fileexists(string path). The 'file' attribute of the cfcontent tag won't do you diddly if it can't find the file you're looking for (you may have thought of this already, but it's the simple stupid stuff that always catches me with my pants down...) Pathing is one of those things that can, and will, catch you off guard;) Cutter Mike Kear wrote: I tried Matt's method of using CFContent to serve the files to the user, and worked just like a charm - on my dev machine. I was able to not only do what I needed, and keep good stats and log of activity, but do some other cool stuff too like have the pages fed from a database instead of a static page, thereby allowing much easier updating of content etc. Good .. EXCEPT . It didnt work on my production machine. A shared host.At first I figured we had CFContent disabled, but Im assured that CFContent is NOT disabled for the site in question.Now i have to go back to the code, to look for what I might have got wrong somewhere along the line. Are there any 'gotchas' with CFCONTENT in a shared hosting environment i ought to look for? Failing that, I think since the app worked beautifully first time on my dev machine, the only possibility is that I forgot to upload one of the files or something REALLY dumb like that.Any other ideas? Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Mon, 2 Jan 2006 05:42:50 -0800 Matt Robertson [EMAIL PROTECTED] wrote: Use cfcontent to push the files to them. Then you can work whatever tracking code you want into the picture. http://mysecretbase.com/How_To_Display_Protected_Files.cfm -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228256 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Tracking downloads of mp3 files
Have you got the right path to the file? Are you hardcoding the path or is it generated dynamically? ExpandPath() or GetCurrentTemplatePath()? Ade -Original Message- From: Mike Kear [mailto:[EMAIL PROTECTED] Sent: 03 January 2006 15:19 To: CF-Talk Subject: Re: Tracking downloads of mp3 files I tried Matt's method of using CFContent to serve the files to the user, and worked just like a charm - on my dev machine. I was able to not only do what I needed, and keep good stats and log of activity, but do some other cool stuff too like have the pages fed from a database instead of a static page, thereby allowing much easier updating of content etc. Good .. EXCEPT . It didnt work on my production machine. A shared host.At first I figured we had CFContent disabled, but Im assured that CFContent is NOT disabled for the site in question.Now i have to go back to the code, to look for what I might have got wrong somewhere along the line. Are there any 'gotchas' with CFCONTENT in a shared hosting environment i ought to look for? Failing that, I think since the app worked beautifully first time on my dev machine, the only possibility is that I forgot to upload one of the files or something REALLY dumb like that.Any other ideas? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228258 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Tracking downloads of mp3 files - SOLVED
Thanks Adrian. Another one of those slap the forehead moments DER!! I ran expandpath() on the sound files in question and the path to the site wasn't quite what i thought it was. Problem solved, and files now downloading happily and all my analysis is working too. Thanks to everyone for the suggestions, but it was Adrian thatsolved it. He wins the 5 nights holiday package in the Whitsunday Islands and the plasma TV! Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 1/4/06, Adrian Lynch [EMAIL PROTECTED] wrote: Have you got the right path to the file? Are you hardcoding the path or is it generated dynamically? ExpandPath() or GetCurrentTemplatePath()? Ade ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228319 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Tracking downloads of mp3 files
I have a site where I have a series of mp3 files for radio hosts to download, for their radio shows. I want to track who's downloading what. I have a simple stats app that keeps track of who goes where, based on teh cgi info and their login information, but it doesnt record the links they click on to download the mp3 files. So currently all I know is that user X went to page Y, but no info about what they did there. The links are currently just simple html links to the mp3 files, and I'm thinking the way to track who's downloading is to make the links to another cfm file that serves up the requested file, posting the data to the statistics table at the same time. And how does this second file start the downloading of the requested file? Is this the best way or is there a better way that I havent recognised yet? -- Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228125 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Tracking downloads of mp3 files
You could also look at the server logs if you don't mind a delay in the reporting. Ade -Original Message- From: Mike Kear [mailto:[EMAIL PROTECTED] Sent: 02 January 2006 13:22 To: CF-Talk Subject: Tracking downloads of mp3 files I have a site where I have a series of mp3 files for radio hosts to download, for their radio shows. I want to track who's downloading what. I have a simple stats app that keeps track of who goes where, based on teh cgi info and their login information, but it doesnt record the links they click on to download the mp3 files. So currently all I know is that user X went to page Y, but no info about what they did there. The links are currently just simple html links to the mp3 files, and I'm thinking the way to track who's downloading is to make the links to another cfm file that serves up the requested file, posting the data to the statistics table at the same time. And how does this second file start the downloading of the requested file? Is this the best way or is there a better way that I havent recognised yet? -- Cheers Mike Kear ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228127 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Tracking downloads of mp3 files
Use cfcontent to push the files to them. Then you can work whatever tracking code you want into the picture. http://mysecretbase.com/How_To_Display_Protected_Files.cfm -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228128 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Tracking downloads of mp3 files
instead of a direct link to the file ... eg. http://www.mysite.com/music.mp3 add a url variable to a link to a download processing template. .. eg... http://www.mysite.com/download.cfm?mp3ID=#filename or some identifier# then you can use the url value to record the download in your database then redirect to the actual mp3 the user is requesting. If you want me to expand on this let me know, but that's the outline. Jenny -Original Message- From: Mike Kear [mailto:[EMAIL PROTECTED] Sent: 02 January 2006 13:22 To: CF-Talk Subject: Tracking downloads of mp3 files I have a site where I have a series of mp3 files for radio hosts to download, for their radio shows. I want to track who's downloading what. I have a simple stats app that keeps track of who goes where, based on teh cgi info and their login information, but it doesnt record the links they click on to download the mp3 files. So currently all I know is that user X went to page Y, but no info about what they did there. The links are currently just simple html links to the mp3 files, and I'm thinking the way to track who's downloading is to make the links to another cfm file that serves up the requested file, posting the data to the statistics table at the same time. And how does this second file start the downloading of the requested file? Is this the best way or is there a better way that I havent recognised yet? -- Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228130 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Tracking downloads of mp3 files
Couldn't you also pull that from the server logs? Eric On Mon, 2 Jan 2006 05:42:50 -0800 Matt Robertson [EMAIL PROTECTED] wrote: Use cfcontent to push the files to them. Then you can work whatever tracking code you want into the picture. http://mysecretbase.com/How_To_Display_Protected_Files.cfm -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228139 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54