Chrisj Posted August 19, 2009 Share Posted August 19, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/170933-any-way-to-hide-the-path/ Share on other sites More sharing options...
oni-kun Posted August 19, 2009 Share Posted August 19, 2009 Use a thumbnail script. such as it'd link like.. <img src="thumbnail.php?vid=304923"/> and problem solved! Quote Link to comment https://forums.phpfreaks.com/topic/170933-any-way-to-hide-the-path/#findComment-901524 Share on other sites More sharing options...
MadTechie Posted August 19, 2009 Share Posted August 19, 2009 You could hide the path but it wouldn't be a great solution. I think a better solution would be to move the files outside of the public folder and create a script to pull the data this links explains the idea of putting things outside of public access, as for a script to access them here's a simple jpeg example <?php session_start(); if($_SESSION['access'] != true) //whatever { die("No access"); } //Above isn't required but could be used for member only access $file = str_replace("/", "", $_GET['file']);//basic filter header('Content-Type: image/jpeg'); readfile($file.".jpg");//output file contents to ?> EDIT:ripped from oni-kun example <img src="private.php?file=example"/> Quote Link to comment https://forums.phpfreaks.com/topic/170933-any-way-to-hide-the-path/#findComment-901526 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.