GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   Secure streaming link (https://gfy.com/showthread.php?t=1110054)

arena18 05-20-2013 07:42 PM

Secure streaming link
 
How to secure and protect video link from direct downloads...
I am try to make something like this link

Code:

server1.site.com/videos/123/456/789.mp4?key=0457043013fbd9ebae8ae3
Where is key= I can add user session ID, or something else, and in that way protect direct download without the proper key...

Code:

server1.site.com/videos/123/456/789.mp4
But do I make this work with .htaccess? I am on apache web server and I don't know other way to make this!


edit: good example is here this is stream link from vimeo and can be downloaded
Code:

pdl.vimeocdn.com/42891/829/162390948.mp4?aktimeoffset=0&aksessionid=3b9dcceb7a14b3436e0a7bfa0b40126b&token=1369110913_9c3017a9a1bbb77b1ca36c7b7c1eb7
but this you cant download
Code:

pdl.vimeocdn.com/42891/829/162390948.mp4
Also KVS script and pornhub use same techniques to protect videos i think..

evil0x 05-20-2013 08:53 PM

you can use flowplayer.

Tent Pitcher 05-20-2013 10:15 PM

What you are asking does not have a simple answer...if you want to add a session key to the query string like your examples, you will need to employ a bit of Perl or PHP scripting. First, you would probably want to generate a session Id and store it as a cookie on the user's machine, then you will need to access that cookie and append it to the query string when a video is requested. This would require some sort of account management script.

Your best bet is to enlist the help of a PHP or Perl programmer to code something up for you. It isn't difficult if you know what you're doing with that kind of thing.

arena18 05-21-2013 05:47 AM

Yes i can make it with php, its not a problem, but example above hmm ...im not sure its a php, i think this can be done via htaccess

Tent Pitcher 05-21-2013 09:36 PM

Sure, you could do it with .htaccess, the problem is that you only have a couple of options:

1. Allow any "key" matching a specific pattern to access the content

2. Store all of the "keys" in your .htaccess and iterate through them every time a URL is accessed

The Vimeo example you posted is using a unique session Id to track a user around the web site. That user's credentials are tied to that session Id so when that user tries to access a video, all the server needs to do is cross-reference the session Id with the user's permissions to see if they have access to the requested URL or not. This is common practice among larger sites.

I promise you that Vimeo is using cookies and scripting to manage that level of access to their assets. .htaccess is bad ass, just not for that kind of work :upsidedow.

If you know PHP, you can code something up like that in a few lines...let me know if you need a starting point.

arena18 05-22-2013 06:55 AM

Im make it with php, and video URL looks like
Code:

site.com/playback?key=98w73987354234&id=54564651
key is encoded(user IP + sessionID)

in php im compare if userIP+sessionid = &_GET['key ']{

Also im limit streem speed to 350kb/s ...

So php is maybe good option , but maybe little slow when you seek video...

Babaganoosh 05-22-2013 11:05 AM

I use mod_auth_token - https://code.google.com/p/mod-auth-token/

Tent Pitcher 05-22-2013 09:39 PM

Quote:

Originally Posted by arena18 (Post 19635395)
Im make it with php, and video URL looks like
Code:

site.com/playback?key=98w73987354234&id=54564651
key is encoded(user IP + sessionID)

in php im compare if userIP+sessionid = &_GET['key ']{

Also im limit streem speed to 350kb/s ...

So php is maybe good option , but maybe little slow when you seek video...

That looks like the correct approach...I am curious to know what you are doing after the authentication though as PHP shouldn't be limiting your streaming speed at all.

The best way to do it is to do your authentication before you print any HTTP headers, then use the "location" directive to redirect the HTTP request to the appropriate video file. This will all be seamless to the user and the only bandwidth limitation will be your server/ISP.

PHP is just the middle-man in the request - it authenticates and redirects accordingly.

nixem 06-14-2013 01:33 PM

There are a few WP plugins that do this for videos and digital downloads. WPEC is one for digital downloads... id look at that plugin and see what makes it tick... ill do a lil research for ya tonight.

AHarper 12-02-2013 03:19 PM

Quote:

Originally Posted by nixem (Post 19670860)
There are a few WP plugins that do this for videos and digital downloads. WPEC is one for digital downloads... id look at that plugin and see what makes it tick... ill do a lil research for ya tonight.

Did you find anything?

CPA-Rush 12-03-2013 08:29 PM

late answer but chaturbate has similar thing http://aws.amazon.com .. they use it to block unauthorized users from viewing media on models profiles

any verified model is allowed to upload files directly to amzn cloud and put price for the content

CPA-Rush 12-03-2013 08:40 PM

for example i can access this thumbnail link for 10 minutes

https://cbphotovideo.s3.amazonaws.co...5I24YED36F5HNQ

but i will never be able to access big picture if i'm not authorized... something like

https://cbphotovideo.s3.amazonaws.co...5I24YED36F5HNQ


All times are GMT -7. The time now is 07:20 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc