Posts

Showing posts from August, 2017

Random thoughts: 1

Person 1 (To a  judgemental   person -2): Hey you. Here I have two tubes filled with blood. Can you tell me which one belongs to a high-born and which to a low - born? ( A bit of Nana Patekar touch) Person 2: No. How am I supposed to ?

S02E04: Now we know!

Image
The Resurrection ( The time is near) (Mini web series) Have you read the  last  episode yet? Read it  here , if not...! Episode 16: Now we know ‘H ere’s the deal,’ Akshat was visibly off. ‘Tell me at least something! I feel like I’m in love with a stranger! I love you and I am living with you – hell, I’m practically sharing my entire life with you! And yet, I feel like you’re just a whole new person every new day!’ Some might see it as a whiny possessive typical Indian boyfriend rant, but where the things stood between them, Akshat was being fairly modest in his complaints. With all her secretive past and her heroic activities, Ritika had always been a very private and hard person. And that might be just fine for a short fling or a one night stand. But that wasn’t the case with them, and things were beginning to get nasty now.

Make your own URL shortener in PHP Part -3

This is third part of our 3 tutorial series of URL shortener. In this tutorial I am going to show you the last file needed to complete our project. If you have missed our first two tutorials than you can visit theme here. Part – I: CreateDb and get Long URL from user, insert that URL in Db and generate short URL. Part – II: Captureshort URL on server using .htaccess code lines and redirect it to the handlingscript, i.e redirect.php Now let’s continue with our Part –III. Coding Redirect.php As shown in part-2, when a query of short URL such as tx01.comeze/urlR/abcXYZ is fired, it gets redirected as redirect.php?id=abcXYZ This means that our long url’s base 64 part (mentioned in part -1 )   i.e “abcXYZ” in this URL is sent as GET parameter to that page. Hence we can use the GET array on redirect.php script to get the base 64 part. We can do this in PHP using:  $links=$_GET['id'];

Make your own URL shortener in PHP - Part 2

Here is the part -2 of our URL shortener making tutorial.  In the first part of this tutorial: We already made a table to store long and short URLs with an auto increment id column used to generate the short URL. W e made an HTML form on one page which takes long / original URL from the user and submits it to a PHP scripted page. That PHP scripted page handles the long URL by inserting it in the database first and then generates the short URL. If you missed the first part of this tutorial: Click Here.   You can also check the live implementation here: tx01.comeze.com/urlS           In this part I am going to show you how to capture the short URL on our server and redirect it to a script in order to search the short URL in our database and get its original URL from there and make a redirect to it. So let’s get started.

Make your own URL shortener in PHP - Part 1

Image
In this article I am going to show you how to make a URL shortener using PHP.  In this project we will:  Use a MySQL database in which we will insert the information of URL and its short URL. We will use PHP for shortening the original URL. We will use few Directives / Apache .htaccess code lines to redirect short URL to original URL. For this article purpose I am using WAMP server on my local computer, but I have also implemented this on an online server at this URL : http://tx01.comeze.com/urlS . I know this URL itself is too long but it is only for the learning purpose. Here is one URL which I created :  http://tx01.comeze.com/urlR/m