Forum Moderators: phranque

Message Too Old, No Replies

Restrict flv play by ip

         

webstyler

10:41 pm on Mar 3, 2009 (gmt 0)

10+ Year Member



Hello

I have a server where is hosted flv file

there are 5 site (external to server) that play this video file

I need now to restrict play for only this domain because the link cannot be hodden so other file play to unauthorized sites..

Thinks that throught htaccess could limit domain where flv is played (ore reguired)..

right ?

could be best way ?

Thanks

jdMorgan

1:50 pm on Mar 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Access to media files is impossible to control based on HTTP_REFERER because media players typically do not send the HTTP Referer request header.

One way to control access is to use a script to serve the media files, and to only send the media files to IP addresses which have previously fetched the correct referring page from your site (set and check a cookie). You will need some 'fancy' logic and a tracking database, though: You must account for visitors connecting through ISPs such as AOL and Earthlink which interpose caching proxies between the user and your site. These visitors will appear to make requests from several different-but-related IP addresses.

This can obviously get quite complex, so consider using a different approach: Instead of trying to stop the hotlinking, monetize it instead. Change your FLV files so that each one starts with a nice big fat link to your site and a description of all the wonderful things to be found there... :)

Jim