PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Jun 05, 2020 1:58 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Jan 20, 2012 3:00 am 
Offline
Forum Newbie

Joined: Fri Dec 09, 2011 1:12 am
Posts: 14
Hello All,

I need a small help. I have an application built in php which stores images and videos as in gallery. A user can click on the video , it will play as in streaming way. This part is ok. now, we have a limitation that we cannot play .vob files using our embedded player. so I just put an href tag to the location of that video thus user can download/play according to the client browser settings. this is again ok. but the issue arise , when I go for seeing source code. since href is a direct url , it shows complete path of video including all dir which is not good for security.. I am just wondering, how can I mask this?

I know URL encoding but issue is

my code for external client side video play is like this

Syntax: [ Download ] [ Hide ]
<a href ="/rootfolder/videofolder/video.vob"></a>
. from my knowledge href tag only accept non-formatted values right?/ I mean can I put some thing like this ??

<a href="#8743854358jsdsad76as"></a>.. I dont think so...am I so dump?:D

okies.. my requirement is , when client go for seeing source code, the source url of video should be masked/encrypted....any help???/


thanx


Top
 Profile  
 
PostPosted: Fri Jan 20, 2012 4:19 am 
Offline
Forum Newbie
User avatar

Joined: Wed Jan 18, 2012 7:35 am
Posts: 24
Location: London
you could probably use Apache mod_rewrite or mod_alias to manipulate the URL.


Top
 Profile  
 
PostPosted: Sat Jan 21, 2012 3:02 am 
Offline
Forum Newbie

Joined: Fri Dec 09, 2011 1:12 am
Posts: 14


Top
 Profile  
 
PostPosted: Mon Jan 23, 2012 9:59 pm 
Offline
Forum Newbie

Joined: Fri Dec 09, 2011 1:12 am
Posts: 14
I found solution from other forum.. sharing for others who in need..

<?php
$userinput = "hi.wmv";
echo '<a href="showvideo.php?video=', urlencode($userinput), '">';
?>


thanx to original poster of this code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group