Hello Guys and today i am here with my new tutorial on how to make a Url Shortener , and as you guys know that now a days there are many websites for shortening the url’s and many of them are very good as in them we can see the analytics of the url so that we can see how many people has click the url and see the websites and we can see that viewer are from which country as well.
So lets talk about,
What is Url Shortener?
So basically what url shortener is the when we visit some websites and like something and want to post them on social networking website like facebook ,google+ ,twitter etc but the url of that page is soo big and you wanted it to be short so it’ll be look nice and clean and that’s what url shortener does on making he clean and short url’s.
Can we earn money through short url?
And the answer is Yes , there are many websites which pay us for shortening the url’s from their websites, So let me tell your how this Works!
Basically when a user shorten the url from the website and share that url on any social platform and as the user visit the website from that short url, Every 1000 people who visit the website the user get paid and the payment may vary in each website. I hope your guys understand that how to earn money from shortening the url’s , it basically pays the user per 1000 views from the link to the websites.
And no no this script does not allow user to make money , as this is just a script that allow user to short very big url’s to short the domain and convert it into 7 word random string For Ex-
If i had a url like this https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg
So, when you short the url it will shoten the url in this pattern :
http://yourwebiste.com/xxxxxxx where x is equals to 7 digit random string.
and that how it works.
So when a user shorten the url and submit the url it’ll be store the url and the random sting in the database.
And in this tutorial i am using the w3.css , php and mysql and i hope you guys are now very familiar with w3.css framework very much as my many tutorial are in built using that framework.
So lets take a look on the source codes.
you can replace the details of your database with yours
This is the file for making the clean url’s like from
http://yourwebsite.com/get.php?title=xxxxxxx To http://yourwebsite.com/xxxxxxx
Ans this looks more clean and nice.
Thanks and i see you next time, till then