Shlink is a self-hosted and PHP-based open source URL shortener. It also comes with a built-in command line interface (CLI), so it can be used as an external service from the shell, such as for cron jobs.
By default Shlink uses its own API but it's also possible to use other services like goo.gl or bitly by changing configuration files and switch between them at any point of time. For example: https://github.com/kstaudacher/shlink#usage
A page can be generated in HTML format or simply as JSON data making it easy to embed into mobile apps or third party tools like bookmarking services or url shorteners .
Shlink was originally developed by Liran Tal in 2010 and fully open-sourced in early 2012 after being used in production for around six months.
The name, Shlink , is derived from the German word (meaning short) but with an added "sh" to indicate that it's a shell command.
Shlink exists because the author needed a simple tool for URL shortening with minimal maintenance while working on his master thesis project. It had to be easy to install and run so he can keep track of its logs/issues directly without having too many dependencies or supporting multiple programming languages. The original implementation was written in PHP although it can easily be ported onto other languages like Python or Ruby . An alternative written more than four years ago in Node.js can be found here: https://github.com/rzepka/node-shlink [Note from the Author : I see this as a very good example of giving back to the community, reusing code and also for providing a package for use in other languages without reinventing the wheel.]
The CLI was added later because it was needed to run cron jobs that send automatic link tracking emails while using Gmail SMTP servers . It's possible to add more email services by changing configuration files but Gmail is used by default.
For all these reasons Shlink is easy to install and customize while being powerful yet lightweight enough so you won't have any problems with loading or performance issues. In addition, it supports older versions of PHP going back to 5.2.4 , so it can be used with older servers .
The REST API was added in v1.5 and its main purpose is for internal use by other Shlink -based services, such as a web app for internal sharing links with co-workers or friends... but it can also be used like any third party service like Buffer ( https://bufferapp.com/ ) by scheduling posts whenever you want them to appear on Twitter or Facebook . On top of that you also get 100% real user tracking through the Analytics module , which does not depend on cookies or any other type of browser storage (see https://github.com/kstaudacher/shlink#usage ).
Shlink is released under the MIT-license so you can modify it or use parts of its code in your own projects while being completely free. See LICENSE file for more info.
For more screenshots see the bottom of this page .
* Note : For best performance Shlink should be hosted on a Unix system, but if that's not an option then just build the project using XAMMP or WAMP on Windows/Mac and run it locally ( http://www.apachefriends.org/ ). The binaries are included with each release like PHP CLI ( shlink ) and mysqld ( shlink_sql ), which makes it easy to setup without having to install any dependencies manually. Alternatively you can also find all binaries in the bin directory when you download the project.
* Note2 : Shlink is designed to run locally without any changes, except for config/config.default.php , which can be modified or copied into config/config.local.php . Once done with that please make sure to chmod 777 configuration files and directories at least read/write for all three user groups (users, web server and system) if they are not readable by default. This might be necessary on Linux systems but most recent distributions are already configured this way out of the box so it won't be needed in most cases. As long as there are no conflicts within setting up permissions everything should work fine without them, but they do provide extra security by hiding sensitive information from unauthorized users, so it's a good idea to set them up. If you do have problems with permissions please let me know and I'll try to solve the issue as quickly as possible.
* Note3 : You can choose which modules do you want installed in your application by using the --modules argument when initializing a new instance or updaing an existing one. This way you will keep things slim by only including exactly what is needed without having to worry about HTTP load times (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Performance_considerations#Event_handling_and_progressive_enhancement ) while giving other developers more flexibility they decide not to use certain modules and save disk space. Here is an example how to create a new instance in just one line:
$ php shlink/cli/setup --modules=config,analytics,debug
If you have any problems or need help then please feel free to contact me by email or post an issue on the bug tracker . I can't promise I can solve your problem right away because everyone is busy at the moment but you will receive a response as soon as possible. Thanks for your understanding!
Top Blog Posts
- Learn HTML in 12 Minutes 4 months ago
- FOCUS ON YOURSELF NOT OTHERS - Best Motivational Speech 2021 6 months ago
- British English Slang [Advanced Pronunciation Practice] - Reductions & Contractions 6 months ago
- Best URL Shortener: Why You Should Shorten Your Links 2 months ago
- How To Build Your URL Short System (Premium URL Shortening Setup) 6 months ago