MiniUrlz – url shortening script

Description:

Very simple to install and use free url shortening script that will let you set up your own service in a few minutes. Front page design can be easily modified by editing just a one template file - "template.html" (front page HTML is totally separated from PHP!). It does not require any database to work. Submitted urls can be easily managed through integrated administrator panel.

Features:

  • No database required
  • Handle unlimited number of urls
  • Totally separated from PHP & easy to edit front page
  • Integrated administrator panel
  • Redirect all traffic from removed & non existing shortcuts (new!)
  • Click count & date of last click (new!)
  • Quick 1-2-3 setup (upload / CHMOD / Run SETUP.PHP)

Installation:

  1. Upload all files to your server
  2. CHMOD following files and folders to be writable & readable by PHP (if unsure set 777):
    - "store" folder with all files in it (store/*)
    - ".htaccess"
    - "conf.inc.php"
  3. Run "setup.php" in your web browser (for example http://www.yourdomain.com/setup.php) and follow instructions

If you want to access administrator panel you need to open "admin.php" in your web browser and use login & password that was set during installation.

Updating:

If you want to update script from previous version, you should overwrite all files except "template.html" and follow "Installation" instructions. You will not loose any previously created links. Just keep your "store" folder untouched.

Main page template customization:

If you want to customize your main page you need to edit "template.html" and "style.css". Don't forget to use {status_info} template tag. It will be replaced with system messages (created urls or errors).

Demo (live versions):

Donated installations (thanks!):

Here is the list of licensed domains of people that have donated to remove the footer (if you are not here and you think you should be please contact me):

  • 2me2u.me
  • 4.cc
  • babyurl.net
  • cro.cx
  • drugz.in
  • groa.st
  • jumplink.dk
  • losw.co.uk
  • ninjurl.us
  • no6.fr
  • plp.cl
  • qak.ca
  • qgeek.es
  • raio.ws
  • sith.biz
  • sputnik.mobi
  • sputnik.ws
  • tiny.bz
  • tiny-url.ca
  • twtt.r.gd
  • url2.biz
  • url2.me.uk
  • url-d.com
  • urlshortener.ws

Download:

To download this script for free please visit my please visit its GitHub page.

Donations are welcome:

MiniUrlz is free of charge but your donations help to pay some hosting bills and motivate me to continue my work.

How to remove footer links from MiniUrlz front page:

As stated below (in the license paragraph) you can not remove or hide footer links without author permission. You can get author (mine) permission to remove it by donating €10 or $15 per domain. If you are interested please donate with button above and contact me (provide your domain name). You will receive new license file that should be uploaded to your installation. It will display your domain name instead of standard footer.

If you need more informations here is detailed post about removing MiniUrlz footer.

Changelog:

  • Version 1.0b - First release
  • Version 1.1 - Imroved installation script, improved links pagination in admin panel, fixed template function (closed BODY tag)
  • Version 1.1.1 - Fixed setup script. On some hosts previous setup might broke .htaccess file that cause script not to work at all.
  • Version 1.5 - New features added: Redirecting all traffic from deleted & not existing shortcuts, click count, last click date count, shortcut creation date.
    Code cleanup: fixed encoding, improved readability in administrator area, general code cleanup.

License:

Script is released under Creative Commons Attribution 3.0 Unported License. It mean that you may use, modify and redistribute this scripts for free but you may not remove or hide any links in the footer without author permission. If you want to remove links from your installed copy please read next paragraph.

Leave a Reply to KreCi Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  1. Pingback: Increase your earnings with pretty links – Part 2 | KreCi's Blog

  2. Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in …./il1rsoft/short/parser.class.php on line 5

    Help please

    • Probably you are using old version of php (4.x). You should upgrade your PHP.
      Or you may edit “parser.class.php” and in line 5 instead of:
      private $output;
      try:
      var $output;

      But probably there will be more errors until you upgrade your PHP.

  3. Pingback: MiniUrlz 1.5 with new features released! | KreCi's Blog

    • Please make sure that your “.htaccess” file is readable by your apache server (check CHMOD – if unsure set 777). If it would not help you need to see .htaccess compatibility according to your web host.

  4. Not Found

    The requested URL /url-1.5/go.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

  5. This is a very good script, thank you !

    I have a suggestion (a request? ^^), can you include the reCaptcha api, and anti refferer in your script MiniUrlz, just before the redirect ?

  6. Pingback: En iyi URL kısaltma Scriptleri « eCevher

  7. Pingback: Acortador De URL´s Propio | Zona AIO | Tecnologia, Ocio, Tutoriales, Y Mas

  8. I see that there is an update but, I also see that there are different methods of updating depending on what version I am currently using, which I am not sure of. Is there any way to tell what version I currently have? I have looked in the config file and also in the admin directory but I don’t see it anywhere?

    Any help would be much appreciated!

    Thanks

  9. thanks for providing free script. it will be more helpful if you include redirection delay timing option(i.e after we click link before redirecting to link 2-3 sec delay like linkbucks or adf.ly)

  10. Thanks for the script, very easy to set-up. The only problem I had was that the .htaccess file was hidden on the mac, so I had to download – http://www.macupdate.com/app/mac/15585/show%5Chide-files

    This allows you to show/hide .dot files so I could upload it to the server. Only hiccup I had, installation and upload was very quick and it seems to work fine.

    Thanks for the great script, now to tailor a design ;)

  11. Hello
    I hope good Haltvn

    Sorry, the script from the address they used in space does not accept
    and will get the following error:

    Invalid URL! Remeber to put “http://” on the beggining!

    I know there is a solution for this?

    For example, you can test it here:

    http://snd.tebyan.net/1389/12/12% 20mohamade.mp3_84681.mp3

  12. Hi KreCi! Thanks for the script!

    Now I have this error:

    Deprecated: Assigning the return value of new by reference is deprecated in /home/tincho08/public_html/miniurls/index.php on line 26

    What can I do?

  13. tried to use the script in an iFrame… displays initial form but does not work when form is submitted. Why is completed form (the shortened url) not staying in the same iframe?

  14. Hi, Kreci. Your script is beautiful, I really love it. But I want to add several languages,​​ because I`m Arabic from Saudi Arabia, and I want to offer service for visitors from all over the world. Can I do that?

  15. Excellent script, thanks a lot! :) Installed and runs smoothly!
    The only issue I had was length of username – during installation, I chose a long username, and when I tried to login, I relized it allows up to 8 characters; so I deleted it and re-installed. Later on, I sniffed around, and found that setting in “login.php” file; you should increase that value, or warn user during installation not to chose longer username. :)

  16. GREAT script, thanks. A few suggestions that would take a great script and put it over the top… and perhaps warrant a paid version ;-)

    Black list of domains or partial domains (ban)
    Ability to sort report (by hits, for example)
    Ability to delete all links that contain the string [XYZ]

    These kind of scripts have the nack of being abused by many, and having the above clean up tools would be a great benefit ;-)

    Thanks for a cool script!

  17. great program and being free is wonderful.
    How do I make it accept longer forwarding descriptions such as

    kreci.net/url/longnameofmycompany
    as it is written it only alows a few characters so I get
    kreci.net/url/longnameo

    Thank you

    • Can’t you read the article above: “If you want to access administrator panel you need to open “admin.php” in your web browser and use login & password that was set during installation.”

  18. hey how to fix this error

    Deprecated: Assigning the return value of new by reference is deprecated in /home/u525655573/public_html/index.php on line 26

  19. This project is still alive? i want to donate for this script,but i need to know if is there more updates and security fixes

    • Hi. I do not have much time to add new features but it is still on my to do list. Script works pretty well with very little server resources usage. If there would happen some critical problems (security or compatibility), it will be fixed. Donations are always welcome and the footer code will be provided.

  20. Security fixes? It needs them. I used the code and within a week spammers had posted links redirecting people to scam sites because anyone can post a link using the main page. The fix is to copy the main page to another name, then edit the main page to remove the input box so not just anyone visiting the page can add urls to your forward script and only the admin can do it or someone who knows the new main page name.

    • The intention of the script is to provide public service. The way that you want to use it is to have private URL shortener. It needs modifications as you say. Those are not a security problems. Spammers will always use free redirection services.

  21. Parse error: syntax error, unexpected ‘new’ (T_NEW) in /home/www/public_html/index.php on line 26

    I can’t access index.php…

    • Sorry. I was using PHP 7.x then. After changing the version, It was fixed.
      But I have a new notice.
      “Deprecated: Assigning the return value of new by reference is deprecated in /home/cnetweb/cntu.cf/public_html/index.php on line 26”

      How can I fix this probrem?

      • Change line 26 from

        $tp=&new templateParser(‘template.html’);

        to read the following:

        $tp=new templateParser(‘template.html’);

        basically remove the & before new and the error message will stop.

        There are also a couple additional mods to functions.inc.php that will need to be made for PHP7 compatibility.

        Hope that helps :)

  22. Getting this error and can’t figure out why. Get this when trying to post a new URL to be shortened.

    Fatal error: Uncaught Error: Call to undefined function eregi() in /opt/lampp/htdocs/functions.inc.php:75 Stack trace: #0 /opt/lampp/htdocs/index.php(11): checkurl(‘https://www.goo…’) #1 {main} thrown in /opt/lampp/htdocs/functions.inc.php on line 75