I hope you guys can help me figure this one out. I'm trying to prevent people from
linking to our surfcam that we have pointed at the beach. So I made an image.cfm file
that contains code that will prevent them from getting the 'correct' image if they
aren't viewing it from our site (it checks the referer, see code below). So now the
surfcam image's src points to image.cfm instead of the actual image.
Anyway, it seems to work great except for one small problem. I guess since the site
is under heavy traffic, it doesn't work all the time, we've been getting strange
errors and inetinfo.exe on the server is maxing out at 100%. This is starting to
happen like every 10 minutes or so. I can't figure out the problem since the code
works on my development machine and it seems like it 'should' work no matter what.
Have you guys experienced anything like this? Is there something I'm not setting
right in the CF Header or CF Content? I've attatched the code from my image.cfm tag
below. Thanks for any help in advance!!
___________ Code Below for image.cfm ____________________
<cfsetting enablecfoutputonly="yes">
<cfif CGI.HTTP_Referer contains "mydomain.com">
<cfheader name="Content-Disposition"
value="inline;filename=""beachcam.jpg""">
<cfif fileexists("c:\inetpub\wwwroot\www\beachcam.jpg")>
<cfcontent type="image/jpeg" file="c:\inetpub\wwwroot\www\beachcam.jpg">
</cfif>
<cfelse>
<cfheader name="Content-Disposition" value="inline;filename=""bad.jpg""">
<cfcontent type="image/jpeg" file="c:\inetpub\wwwroot\www\bad.jpg">
</cfif>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists