Edit
by julio vazquez - 7 years ago (2018-03-13)
how to use php url shortener
| can you explain how to use it php url shortener |
Ask clarification
1 Recommendation
PHP URL Shortener Class: Shorten and expand URLs stored in MySQL database
This class can shorten and expand URLs stored in MySQL database.
It can take a URL and create a shorter version that is stored in a MySQL database using MySQLi.
The class can also expand existing short URLs looking up on the links database table.
It can also can track the number of clicks shortened URLs when these are expanded and the user browser is redirected to the expanded URL.
The class file itself is the a script that will perform the link shortening or expansion. It relies on .htaccess configuration to handle the shortened URL requests.
| by Alexandre Sinício package author 55 - 7 years ago (2018-03-16) Comment
Maybe this class can help you understand how URL shortening works.
Basically, it creates an index of real-world-links and associates an alias to them. So very.long.url/way/too/long/to/remember' becomes short.link/abc`. The two URLs are mapped on the backend and stored somewhere. When user tries to access the short link,
the PHP server retrieves the real-world URL and redirects user to it. |