Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you want the video link to be useless except in the context of the page you've just returned to the client, you can do something with server-side code.</p> <p>The usual thing is a one-time or limited-duration ID that's generated specifically for the page. For instance, <code>ab23jjgk23098jajzklwravmzzxwrpo2q3476as</code> rather than <code>117</code>. On the server, you have a table mapping these one-time / limited-time IDs to the real ID. In the table you can also link the ID to the IP address of the request for the page, and then only respect the ID if the request for the video comes from that same IP address. It's important that the IDs <em>not</em> actually contain the video ID (obfuscated or not), hence the server-side table, and that they be effectively random.</p> <p>I say "table," but of course it needn't really be a database table. It could be anything that lets you store key/value pairs, such as <code>memcached</code>.</p> <hr> <p><strong>Update</strong> based on your comment below.</p> <p>Without server-side mapping (database, session, <code>memcached</code>, etc.), all you can do is some obfuscation, and it's going to be easy for anyone semi-technical to break. If what you're outputting is a URL (in a link, in an <code>object</code> tag, etc.), you can use URL-encoding to make it hard to read, e.g.:</p> <pre><code>&lt;a href='video.php?%6e%6f%6e%73%65%6e%73%65=%66%6f%6f&amp;%69%64=%31%31%37&amp;%72%75%62%62%69%73%68=%62%61%72'&gt;video&lt;/a&gt; </code></pre> <p>...which, when clicked, will call your <code>video.php</code> file with the parameters <code>nonsense=foo</code>, <code>id=117</code>, and <code>rubbish=bar</code> (that's what's encoded in the query string, using percent-encoded entities). But again, although it might deter non-technical people, technical people won't be fazed.</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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