URL Shortening services like bit.ly and tinyurl are very popluar right now, why not have your own? In this episode i show you how to use a PHP script to create your own URL Shortening service.
To accomplish this I use the PHPURL script from: http://blondish.net/resources/scripts/phpurl/
It’s a pretty easy script to install. First you download the file from the above URL, then extract the files using winzip or any other file compression software
Then you can FTP the files up to your web server.
Once you’ve done that, you need to create a database, and a user, and give that user access to the database. I do this from the MYSQL command line, using the following commands:
- create database databasename; (I used a database name of ‘tinyurl’)
- create username@localhost identified by ‘password’;
- grant all on databasename.* to username@localhost;
Once that’s done, you edit the config.php file and enter this information, as well as entering a admin username and password (make sure to change it from the default password of password!)
Then you run the install script at yourdomain.com/install.php
That’s it! Once that is done you have a fully functioning URL Shortening service that anybody can use. It works great. Enjoy!
Wonderful video on my script PHPurl. Thanks!
Hostees with cPanel, Powweb, and GoDaddy can create their own databases from their control panels. Some hostees may not be very comfortable with Shell access or might not have them. Some smaller biz webhosts with cPanel do not grant SSH for security reasons.
Some hosts are not localhosts like Powweb and GoDaddy.
Thanks. To be honest I checked out quite a few URL shortening scripts and most of them sucked. Yours was the best and did exactly what I wanted to do. I might do another video of how to create the database from cpanel, when I have some time. Thanks again for the great app.
I hate to ask this of you… would you do me a favor by changing the URL to http://blondish.net . I am trying to make sure that my traffic comes to the main part of my site and I am revamping my site at the moment so I can include links from the main page to my resources.
I appreciate it a lot.