Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First off, it is very easy to spoof a referer. This information is stored in the user's browser, so a user can simply telnet into your server and provide his own referer which matches your domain.</p> <p>A couple things you could try:</p> <p>First, more secure, but still spoofable. mod_rewrite provides the ability to check cookies. What you could do is set a cookie when the user visits your website that contains some obscure data. Then, you could modify your RerwriteCond to something like this: </p> <pre><code>RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_COOKIE} obscurename=obscurevalue [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC] RewriteRule \.(asx¦ASX)$ http://www.yourdomain.com/images/leech.gif [R,L] </code></pre> <p>Another, better technique would involve working with PHP and mime-types. I'm not sure to what extent this would support streaming content, but I assume it'll work. What you can do is have all your video links point to a .php file (the query string will determine which video has been selected). Then, when a user tries to visit this link, you do something like so:</p> <pre><code>&lt;?php // You could also check some sort of session variable // that is set when the user visits another part of your // site if(!isLoggedIn()){ header("Location: errorPage.htm"); exit; }else{ // Get the name of the file specified $file = get_file_name($_GET['fileID']); // Specify the proper mime-type for the data you're sending // (this may have to change, depending on your situation) header("Content-type: video/vnd.rn-realvideo"); // Read the file and output it to the browser readfile($file); } ?&gt; </code></pre> <p>From what I read, most servers know which mime-types are streaming mime-types, so the browser should be able to figure out how to handle the streaming file properly.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload