Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A simple version of shorter links, usable and understandable by everyone

License

NotificationsYou must be signed in to change notification settings

Ed0ardo/ShorterLinks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.


Live Demo:

You can test the it onTHIS SITE!

ShorterURL_test.gif


Features:

  • 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

Note:

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


Prerequisites:

  • PHP

  • A site (obviously)

  • A database (I use MySQL)


Installation:

  1. Create a database with a table called"associations" with this schema:

    codelinkdata
    varchar()varchar()timestamp
    CREATETABLE `associations` (`code`varchar(20) DEFAULTNULL,`link`varchar(767) DEFAULTNULL,`data`timestampNULL DEFAULTCURRENT_TIMESTAMP,  UNIQUE (`code`),  UNIQUE (`link`));
  2. Editindex.php with the database login credentials you just created

  3. Replace in the various files the word"xx.xx" with your site, in my case it was"ed0.it"

  4. Insert the.htaccess andredirect.php into the site root

  5. Create a sub folder calledsl

  6. Insert theindex.php,result andstyle.css into the sub foldersl

  7. That's all folks!


Donation:

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


[8]ページ先頭

©2009-2025 Movatter.jp