Get Original URL from Short URL using PHP and CURL

Today I am going to write a tutorial on how to get Original URL’s from Short URL using PHP and CURL. There are many URL shortning services out there like goo.gl, bit.ly and many more. And many people don’t want to go to unknown websites using these short URL’s. So here is a small script to find the original URL behind the short URL using PHP and CURL.

 

Get Original URL from Short URL using PHP and CURL

Here is a small PHP snippet that will do it all. Above is a screenshot of actual processed code which is showing you a text field for entering your short url and then clicking submit button for getting result. It will get you original link behind the short URL.

 

Hope you like it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

scroll to top