YOURLS: Your Own URL Shortener
YOURLS

YOURLS version 1.8.2 is available. Please update!

Here you can manually upload a file into the cache for retreival via another script.

Select a file


Original File Name Hashed Name
There's nothing here to see, go upload some files!

Checks

SRV.php: srv.php is not in the "pages" directory!

Cache Location

Please set the absolute path to the desired cache location. This should be outside of the webserver's path.

Cache Afterlife

Preserve
Delete

Decide what happens to the cache when this plugin is deactivated


File Publishing Via U-SRV link

You can use a simple GET request to retrieve a code from U-SRV at the following address:

http://www.dvsvri.gov.my/form/srv/

With the following parameters:

  • id => 'usrv_files'
  • key => $key
  • fn => $fn

id

The id of the plugin calling for a file. Any plugin or script can access files via U-SRV in the default storage location with the value usrv_files so long as the other values are valid as well.

key

A key is valid for, at most, one minute, and is determined by hashing a unique timestamp concatenated with the ID. The following PHP produces a valid key:

$now = round(time()/60);
$key = md5($now . 'usrv_files');

Which gives the following live value:

963090fc140a08daae85e701e40b47fc

fn

The file name is plugin specific, and must match an existing filename. See specific plugin documentation for details. If using the file upload feature of this plugin, concatenate and hash usrv_files and the original file name and add .zip:

$fn = md5('usrv_files'.'example.mp3') . '.zip';

Resulting in:

36eaf1dfaeac883e821c10107e56b6e4.zip


In the context of a PHP file, the following code will utilize the values from above and fetch a file:

<img src="http://www.dvsvri.gov.my/form/srv/?id=usrv_files&key=$key&fn=$fn" />