Here is a simple PHP script for creating your own URL shortening website. It supports multiple domains meaning you could point mydomain1.com and mydomain2.com at the same hosted location and define different URI's to redirect to for each domain.
Download the php files (2.43KB, .zip file)
- Ensure the domain name points at the hosting correctly.
- Add this index file and the .htaccess file into the root directory for the URL you want to shorten from.
- Import the shortens.sql file using phpMyAdmin or similar
- Add a line to the database table created for each shortened URL. e.g:
s_name: test, s_note: some redirect, s_base_from_url: myurl.com, s+base_from_url: /some/text, s_to_url http://www.scorchsoft.com
This script has been created by us and is completely open source and free to use under the MIT open-source licence.