URL Shortener
About this Project
General
This URL Shortener is a complete original creation. The project is designed to function without a database.
URLs are stored as files in a directory and accessed by visiting domain/URL.
There is a click counter for each generated link, logging IP addresses for distinction.
Currently, this feature is visible only to the admin as it is still under development.
A personalized login area is planned for the future, allowing users to view statistical data on their shortened links.
Functionality
Randomly generated short links consist of characters from the pool 0-9, A-Z, and a-z, with a length of 4 characters.
Users can also define custom aliases (short links) of any length. Some words are blocked due to offensive or questionable content—if blocked, a random code is generated instead.
It's important to note that this URL Shortener is publicly accessible, allowing anyone to generate content of any kind.
Additionally, a QR code is generated for each shortened URL using Sharyme, ensuring consistent size regardless of the original link's length.
The protocol for shortening is restricted to http, https, and ftp. The long URL must include the protocol; otherwise, it's considered invalid.
Initially conceived as shareable, each user could have their own instance on the server.
This idea was abandoned, and now there is only this official instance.
Technical Details
Technically, it uses PHP, HTML, CSS, and some Javascript for the frontend, with a less conventional use of Bash for the backend.
--- SERVER STATISTICS ---
number of digits: 6
charset: 1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
URLs ever shorted: 2380
URLs active in counter dir: 1260
URLs active in urls dir: 1312
Entries in Blacklist for custom-URLs: 90
Storage size: 25M