Garry`s One Time URL PHP5 Script

I open Requirements Specification for Advance One Time URL script.
You can see and help with ideas.


I wrote little script + lib for one time url.
this script make MD5 hash string for one time using and redirect file.
the links looks like: and can be used one time only.

The url storing is based on PHP Sessions and link redirection on MOD_REWRITE but there is example
for non MOD_REWRITE using
Example of create of the link:

$one_time_url = new one_time_url();
<a href="<?php echo $one_time_url->make_url(""); ?>">This is one time URL to</a>

The code & example can be downloaded form here.
License: GNU/GPL (open source)

19 thoughts on “Garry`s One Time URL PHP5 Script

  1. the Using .htaccess MOD_REWRITE works for me, but the redirect example doesnt work.

    I am trying to generate the url on the server and then email/ SMS this unique link to a user. Any idea how I can get this to work?

  2. I’m trying to implement secret links to ZIP file downloads and this looks like the perfect solution but I can’t get it to work.

    The .htaccess version just comes straight up with a 404 error and the non .htaccess version just stalls at a while page and never does anything (it seems).

    Does it work on Windows 2008 Shared hosting servers running PHP 5.2.17 or is it Linux only?

    My test page to try it out is here…

    To see the PHP info for the hosting server see here…

  3. hey Phil Tyler,
    1) for non MOD_REWRITE mode – i want to see the error, you can add this line to top of your php file:

    2) are you using APACHE or IIS?

    3) for MOD_REWRITE – you need to use APACHE with MOD_REWRITE module enabled.


  4. I tried to use your one time url library with flash combination to safeguard / protect images. It worked fine but within 24 hours, my host suspended my account for “site causing performance issue” due to zombie processes.

    Do you think your script can cause this problem ? It is the only change I made on my site during that week.

    I’m not complaining, just curious, what caused this problem…Just for information, some 20,000 visitors loaded that page around 50,000 times, within 24 hours or less…

      1. what if I manually close the session using “session_destroy();” at end of my main page ? This will create and delete session on every page load…
        is it a good idea?

  5. pls i need to add the onetime url to my index.php so all the files on my website will be encoded, pls how do i go about it?


Leave a Reply

Your email address will not be published. Required fields are marked *


Protected with Antivirus