It is very fashionable to use services that shorten our links, mainly to make them easier to distribute, to keep personal statistics or simply to make money through the advertising offered by the link shorteners.
I particularly like to shorten my links to distribute them easily and above all to have personalized statistics on who accesses each of them, but nowadays it is difficult to get a service considered good or safe. For all this, I started the task of finding how to shorten my links without depending on third parties, in this way I learned Pol.
What is Polr?
Pol allows you to host your own URL shortener, leave marks on your url and get control of your statistics, it is a very easy to use tool, with a modern and intuitive interface, in addition, this tool has a powerful API.
How can we test Polr
We can access a Polr demo where we can view and test its functionalities, for this we need the use of the following credentials:
- Username:
demo-admin
- Password:
demo-admin
How to install Polr
Polr Requirements
The following software is required to enjoy Polr.
- Apache, nginx, IIS or lighttpd
- PHP> = 5.5.9
- MariaDB or MySQL> = 5.5
- Composer (Optional)
- PHP requirement:
- OpenSSL PHP Extension
- PDO PHP Extension
- PDO MySQL Driver (php5-mysql on Debian & Ubuntu, php5x-pdo_mysql on FreeBSD)
- mbstring PHP Extension
- Tokenizer PHP Extension
- JSON PHP Extension
Downloading the Polr source code
We can download the latest stable version of Polr .
$ sudo su
# Cambiar al directorio de Polr
$ cd /var/www
# clone Polr
$ git clone https://github.com/cydrobolt/polr.git
# Dar permisos a Polr
$ chmod -R 755 polr
$ # git checkout <tag>
# Ejecutar sólo en distribuciones basadas en ubuntu
$ chown -R www-data polr
# Ejecutar sólo en distribuciones basadas en Fedora
$ chown -R apache polr
$ chcon -R -t httpd_sys_rw_content_t polr/storage polr/.env
Installing Polr using composer
# descargar el paquete composer
curl -sS https://getcomposer.org/installer | php
# Actualizar / instalar dependencias
php composer.phar install --no-dev -o
How to get started with the Polr API
We can start using the Polr API From its official site, it is a fairly intuitive API that will allow us to integrate the services it offers in our applications, or simply be able to access it from any services.
Conclusions about Polr
Pol Without a doubt, it is a tool that gives you security when it comes to shortening your links, it has an intuitive interface and can be the basis for you to create your own project with link shorteners. Being open source you can make the necessary improvements and changes, it has a clean code and I think it can be a tool that some of our readers could monetize in the future.
Shorteners always seemed like crap to me, they make life easier for spammers and trolls, plus when one of these sites closes, the links they point to are inaccessible (do you think TinyURL or Bit.ly are going to be forever?). And that I did not even talk about the shorteners that show advertisements before entering a site.
Here is a new one: https://ataj.es/
I've been using it and it works wonders!