hide the path of a video file

Posted on 2009-05-05
Medium Priority
Last Modified: 2012-05-06
we can hide exact path of a jpg file using the kind of script > ( see code )

calling the code like <img src="code.php?img=myimage.jpg" />

but how can i hide exact path of video (mpeg/mpg files) and can it work with embed code like >

<object id="MediaPlayer1"
<BR>standby="Loading Microsoft Windows® Media Player components..."
type="application/x-oleobject" width="250" height="246"><param name="fileName" value="code.php?moviename=mymovie.mpg"><param name="animationatStart" value="true"><param name="transparentatStart" value="true"><param name="autoStart" value="false"><param name="showControls" value="true"><param name="Volume" value="-450"><embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="code.php?moviename=mymovie.mpg"> name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1

could it work like > code.php?moviename=mymovie.mpg ??

$base_img_dir = "uploads/images/";
if (!file_exists($base_img_dir.$_GET['img']) || $_GET['img']=="" ) {
else { $full_image=$base_img_dir.$_GET['img']; }
list($width, $height, $type, $attr) = getimagesize($full_image);
	case "1":
	$img_in = imagecreatefromgif($full_image);
	case "2":
	$img_in = imagecreatefromjpeg($full_image);
	case "3":
	$img_in = imagecreatefrompng($full_image);
//$img_in = imagecreatefromjpeg('spaw2/uploads/images/'.$_GET['img']) or notfound();
$img_out = imagecreatetruecolor($_GET['w'], $_GET['h']);
imagecopyresampled($img_out, $img_in, 0, 0, 0, 0, imagesx($img_out), imagesy($img_out), imagesx($img_in), imagesy($img_in));
	case "1":
	header("Content-type: image/gif");
	case "2":
	header("Content-type: image/jpeg");
	imagejpeg($img_out,NULL, 100);
	case "3":
	header("Content-type: image/png");

Open in new window

Question by:amitbravo
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 111

Accepted Solution

Ray Paseur earned 2000 total points
ID: 24319569
The code snippet appears to be something related to resizing static images, so it is not applicable.  You would probably want something that does readfile() from a hidden source, but I must admit I have never tested such a thing.

What have you tried so far?  What kinds of results or errors did you see?

Featured Post

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question