Jump to content

Any way to hide the path?


Chrisj

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/170933-any-way-to-hide-the-path/
Share on other sites

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  :P

<img src="private.php?file=example"/>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.