Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Update:</strong></p> <p>Example:</p> <p><a href="http://www.pitgroup.nl/demo/protect/?file_id=1&amp;user_id=1&amp;file=string" rel="nofollow noreferrer">http://www.pitgroup.nl/demo/protect/?file_id=1&amp;user_id=1&amp;file=string</a></p> <p>The file=string, does not work, because it is not correct with the database value;</p> <p>The page then shows a link with the correct database value which you can click to view the hidden file. The link you clicked is still at the top then, but it will not work again. The bottom of the page shows the update database value, which is a valid link again.</p> <p>To prevent hotlinking, you should actually use htacces i think.</p> <p>You should do like this:</p> <p>( or something like it )</p> <pre><code>mysql: files: id url created user_files: id user_id file_id string </code></pre> <p>then insert a record into user_files, using the files info, and for the string, do something like: </p> <pre><code>md5( $file-&gt;url . $file-&gt;created . $user-&gt;id ); </code></pre> <p>when a user calls an url, eg:</p> <p>files / fileid / sldfjsdfasduapdj123</p> <p>then you reroute it to a script, that does a lookup in the database for that string, comparing the user id and file id in the record.</p> <p>after the file has been looked up, md5 the string again and save the record.</p> <p>provide the user with headers of the requested file, look at <a href="http://php.net/manual/en/function.header.php" rel="nofollow noreferrer">http://php.net/manual/en/function.header.php</a></p> <p>and your done :)</p> <p>( i use this for a websitet that provides flv content against sms payments )</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.
 

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