YOURLS: Your Own URL Shortener
YOURLS

YOURLS version 1.8.2 is available. Please update!

U-SRV Checks

Plugin: Success: U-SRV is installed and enabled.

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


Cache Settings

Image Cache

Current full path: /home/dvsvigov/public_html/YOURLS_CACHE/qr

Name the cache folder here, do not include a preceeding or trailing slash.

Hint:Change the parent cache location in the U-SRV settings.

Cache Afterlife

Preserve
Delete

Decide what happens to the cache when the plugin is deactivated


QR Code Image Settings

Image Type

Error Correction Level

H: up to 30% damage
Q: up to 25% damage
M: up to 15% damage
L: up to 07% damage

How much damage can the codes take before they start losing data integrity?

Note: The more damage that they can take, the larger the file size.

Image Size


Set the pixel size for qr code image here.

Note:

A value of 5 will result in an image display of 165 x 165

A value of 10 will result in an image display of 330 x 330

Image Silent Zone, aka Frame Size

Determine the size of the blank zone surrounding the codes.

Default is 2, if you run into problems try increasing this number to at least 4. Otherwise, propbably leave this alone.


Logo Settings

A logo can be inserted into each generated QR code.

Use Logo?

Current Logo


Upload Image

Supported filetypes: jpg/png/svg

If you have issues with the logo, try converting your file to the default: png, before upload.

If there are still issues, try matching the qr code output image type to the logo file type, png is preferred.

Scaling

Position

Restore Deafualts

Revert logo settings to default and delete the logo file.


QR Codes will automatically appear in the share box and stats pages. You can expand on this and place the codes on your custom pages, or even call them remotely.

Code 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 => 'iqrcodes'
  • key => $key
  • fn => $fn

id

U-SRV uses this id to know where to look for the actual QRCode images. This should always be the same.

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 . 'iqrcodes');

Which gives the following live value:

38137d792eb7458db3ea85f701d27ba3

fn

The file name, determined by hashing the short url and prepending that with 'qrc_', can be accomplished with the follwoing PHP:

$fn = 'qrc_' . md5(http://www.dvsvri.gov.my/form/$var) . '.png';

If $var = 'V', the filename is:

qrc_5de99b8f81fd8f80b6c797947fab02a0.png.


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

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

Local only Javascript/PHP

QR Codes can be called locally via IQRCodes's javascript functions. Try putting something like the following in your public index.php file. This would be at line 67 in the sample-public-front-page.txt file in the YOURLS root:

<?php if (isset($return['qrcimg'])) echo $return['qrcimg']; ?>

Or try the following example:

<img src="<?php if (isset($return['qrcimg'])) echo $return['qrcimg']; ?>" alt="QRCode">

Mass QR Code Generation

IQRCodes can batch process your entire database at once and generate a QR Code for any short url that is found to be missing one. This is usefull if there were any urls added before the installation of this plugin.

This could be quite resource intensive and time consuming for larger databases. Alternatively, QR Codes are generated for old short urls whenever the sharebox is displayed.