Using PHP and cURL to expand URLs using Google URL shortener API






Yesterday I wrote this post explaining how short goo.gl URLs can be expanded using the newly launched goo.gl API. In that code we used php function get_file_contents to get the response from API.

How about implementing the same functionality using cURL now? If you have libcurl support installed with PHP, you are ready to use the cURL functions of PHP.

Here is the code. API key is not mandatory but Google recommends that you use one. It will increase your per day usage limits...

 •  0 comments  •  flag
Share on Twitter
Published on January 11, 2011 10:49
No comments have been added yet.