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
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"/>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.