Page 1 of 1

Any way to hide the path code?

Posted: Tue Aug 18, 2009 10:03 pm
by chrisjchrisj
I'm using a popular php video-sharing script for my web site.
I've modded it so vistors must pay to view a video, however the path to the thumbnail appears on the html page in the View Source code, which is very similar to the path to the actual video. Is there any way to hide the path code?

Re: Any way to hide the path code?

Posted: Wed Aug 19, 2009 4:13 am
by Mark Baker
rather than use <img src="{url_of_image}"> to display the thumbnail, where {url_of_image} is your path that you want to hide, use <img src="displayImage.php?id={id_of_image}"> where displayImage.php is a little script to read the image identified by {id_of_image} and display it. The {id_of_image} can be pretty much whatever you want, a database key, or whatever that allows the script to locate the actual image file without a user being able to see the path to the image.
Of course, you'll need to write displayImage.php yourself, but there's plenty of examples around to get you started.

Re: Any way to hide the path code?

Posted: Wed Aug 19, 2009 8:50 am
by jackpf
Also, if you don't want people viewing your videos without paying, don't put them in a public path.