Please i beg you... i will do anything

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

edanlee
Forum Newbie
Posts: 15
Joined: Mon Mar 24, 2008 12:05 am

Please i beg you... i will do anything

Post by edanlee »

i'm sorry to be so bold in the subject but i have tried prolly 10-15 forums to get this answered.... in your opinion how would you go about have a video site that didnt show the url to the video.. even if they right clicked and viewed source.. these are all my videos that i created and i dont want them to be passed around. please help me with this... i am grabing all my video info from mysql but i really dont want anyone to see it when i create a popup with a video player that is waiting for the url to be defined. all i need help with is some way to hide the url of the video... if i do something like $movieurl = "tango.flv"; whould it show up as tango.flv in the source of the document when its embeded????

Thank you,
Brian smith
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Please i beg you... i will do anything

Post by Christopher »

A man that will do anything when there is nothing to be done. ;) Honestly, hiding the URL will do little for someone who wants to rip your videos. What do they care about the URLs? Probably a streaming server that implements DRM is the direction you should head given you desperate desire. That would imply tying playback to specific players.

The most effective way to protect your videos is to not make them available -- especially on the Internet.
(#10850)
edanlee
Forum Newbie
Posts: 15
Joined: Mon Mar 24, 2008 12:05 am

Re: Please i beg you... i will do anything

Post by edanlee »

well you see there basicly video tutorials that only a select few can see... if one of these select few start handing out the link to the video then theres no reason to have the permisions... its ... well hard to explain... its a class.. and only these students should be able to see these videos untill the next students enroll....

i hope that helps... can you think of any way to protect me... my qoal is something like http://www.Lynda.com

thank you
Brian Smith
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Please i beg you... i will do anything

Post by Christopher »

Sounds like you need to password protect the videos, or perhaps make them viewable only for a limited time, or both. Both things are possible and pretty easy.
(#10850)
edanlee
Forum Newbie
Posts: 15
Joined: Mon Mar 24, 2008 12:05 am

Re: Please i beg you... i will do anything

Post by edanlee »

i have a user managment set up and all of my videos get listed in repeat region... each name of the video is linked to the url in the database based on the videoid... this url will bring up a popup that will have a flv viewer load the video based on what the video id is... but my worry is that they can right click and get the source which will show what the link to the actual video file is... i just want to hide the url playing in the video player in the pop up... can you please help me by telling me what i need to do as in... use javascript to hide the url. i dont want anyone to tell me the full code... i want to learn how its done i just need a good idea of the proccess... please.

brian smith

btw... i've spent to much time getting the video player code and the database code set up that i dont feel like starting all over to do anything i just want to know how to hide a url...
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Please i beg you... i will do anything

Post by Christopher »

A simple solution would be to deliver your video data through a PHP script. That way the script can verify that they have permission to view the video and you are not putting the files out in your public html directory.
(#10850)
edanlee
Forum Newbie
Posts: 15
Joined: Mon Mar 24, 2008 12:05 am

Re: Please i beg you... i will do anything

Post by edanlee »

so in the popup.php file it should have a if statement? something like:

Code: Select all

<?
session_start ();
if ( $_SESSION['logged_in'] ) {
random code to play movie
}
else {
 echo "You must login to view this video.";
}
    
    
?>
 
should it be something like that and would that keep them from seeing the video url... cause imo even if there is a member... and there logged in.. they will see the video but i'm afraid that they can look at the source and grab the video url and then pass it out to who ever they want with out that person having to log in.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Please i beg you... i will do anything

Post by Christopher »

Yes, something like that. You just need to set the header() and read the file to the browser. If the URL for the video is mysite.com/video.php?id=XYZ then it does not matter if they have the URL or not -- they need a valid account.
(#10850)
edanlee
Forum Newbie
Posts: 15
Joined: Mon Mar 24, 2008 12:05 am

Re: Please i beg you... i will do anything

Post by edanlee »

i have never done anything with headers can you direct me to a good tutorial.... i'm sorry if i am asking to much.. i'm just bald from pulling my hair out...

Brian smith
what would the header be for a flv?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Please i beg you... i will do anything

Post by Christopher »

Look in the PHP manual for the header() function.
(#10850)
edanlee
Forum Newbie
Posts: 15
Joined: Mon Mar 24, 2008 12:05 am

Re: Please i beg you... i will do anything

Post by edanlee »

arborint wrote:Look in the PHP manual for the header() function.
i looked at it and i it doesnt talk about what i need to do with it... to be completly honest i have no clue what to do with the header and how to read the url... can you please elaberate what i need to do...

Brian
aliasxneo
Forum Contributor
Posts: 136
Joined: Thu Aug 31, 2006 12:01 am

Re: Please i beg you... i will do anything

Post by aliasxneo »

If I'm not mistaken returning the video through a PHP script wouldn't exactly solve the pirating problem. If you return the content directly one could just save the returned content as a video and host it somewhere else. If you stream it any decently coded script can download streamed content.

To be honest I don't think there is any 100% effective way to protect them (unless it's through some kind of key exchange security which I'm unaware of).
edanlee
Forum Newbie
Posts: 15
Joined: Mon Mar 24, 2008 12:05 am

Re: Please i beg you... i will do anything

Post by edanlee »

well ty for trying... if anyone else comes across something please let me know... :s

brian smith
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Please i beg you... i will do anything

Post by John Cartwright »

aliasxneo wrote:If I'm not mistaken returning the video through a PHP script wouldn't exactly solve the pirating problem. If you return the content directly one could just save the returned content as a video and host it somewhere else. If you stream it any decently coded script can download streamed content.

To be honest I don't think there is any 100% effective way to protect them (unless it's through some kind of key exchange security which I'm unaware of).
The whole reason we pass the video through the php script is to verify the user has permission to access the video ;)

You'll also need to make use of readfile() in conjunction with sending the correct header()'s, or a similiar function. Take a look at the user comments for some good examples. viewtopic.php?p=56268 may also be of interest.
aliasxneo
Forum Contributor
Posts: 136
Joined: Thu Aug 31, 2006 12:01 am

Re: Please i beg you... i will do anything

Post by aliasxneo »

Jcart wrote:
aliasxneo wrote:If I'm not mistaken returning the video through a PHP script wouldn't exactly solve the pirating problem. If you return the content directly one could just save the returned content as a video and host it somewhere else. If you stream it any decently coded script can download streamed content.

To be honest I don't think there is any 100% effective way to protect them (unless it's through some kind of key exchange security which I'm unaware of).
The whole reason we pass the video through the php script is to verify the user has permission to access the video ;)

You'll also need to make use of readfile() in conjunction with sending the correct header()'s, or a similiar function. Take a look at the user comments for some good examples. viewtopic.php?p=56268 may also be of interest.
Yes but what prevents that person from downloading the streamed video and uploading it somewhere else? His original intent was to remove the URL to the video so that other people could not view it when all the person (who has access) needs to do is download the content as a video, upload it somewhere else, and you get the same effect with a tad bit more work.

A rough example was already posted, viewtopic.php?p=455978#p455978
Post Reply