- Notifications
You must be signed in to change notification settings - Fork1
A simple version of shorter links, usable and understandable by everyone
License
Ed0ardo/ShorterLinks
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Yes it's another shorter links, I tried to leave it as simple as possible so as to make it usable and understandable by as many people as possible.
You can test the it onTHIS SITE!
Same output in case of same input link
Possibility to create almost 100 million short links (99795696 to be precise)
Checks on user input:
The user must actually enter a valid URL
The URL entered must be at least 22 characters (protocol included) otherwise it would be shorter than the exit short link
The site is responsive
Button to copy the short link
Prevent SQL injection
Due to how the database and the scripts have been structured, these features can be easily added:
Custom short link (Ex:ed0.it/google)
Elimination of short links after a certain time
PHP
A site (obviously)
A database (I use MySQL)
Create a database with a table called"associations" with this schema:
code link data varchar() varchar() timestamp CREATETABLE `associations` (`code`varchar(20) DEFAULTNULL,`link`varchar(767) DEFAULTNULL,`data`timestampNULL DEFAULTCURRENT_TIMESTAMP, UNIQUE (`code`), UNIQUE (`link`));
Editindex.php with the database login credentials you just created
Replace in the various files the word"xx.xx" with your site, in my case it was"ed0.it"
Insert the.htaccess andredirect.php into the site root
Create a sub folder calledsl
Insert theindex.php,result andstyle.css into the sub foldersl
That's all folks!
Buy me a coffee(PayPal):Ed0ardo
Buy me a coffee(Binance Pay): 268880867
Buy me a coffee(Binance Wallet): 0x2a895d54c5249349a27183139d5975aa3518d573
Buy me a coffee(Trust Wallet): 0x825fFeB482BE713eA3bFea0F3B8c398813B65269
Buy me a coffee(CashApp): $Ed0ardo
About
A simple version of shorter links, usable and understandable by everyone