0

PHP: Google URL Shortener (With Authorization Key): shorten

Posted by Joys of Programming on in Curl, JSON, PHP

Google provides URL shortening service goo.gl along with an API. In one of our previous post, we discussed how to make anonymous calls to the service, especailly for shortening. But anonymous calls has certain limits, you can not make a large number of calls in a single day. So you can make use of the [...]

Tags: , , ,

 
0

Google URL Shortener: Introduction

Posted by Joys of Programming on in C/C++, Curl, json-c, PHP, Web

Google has a URL shortener service called goo.gl. With URL shortening service, you can shorten a very long URL and share it to a microblogging site like Twitter. The advantage of the URL shorteners is that it saves space. Typical microblogging sites have limited character count for an Update and a long URL can consume [...]

Tags: ,

 
0

How to get HTTP headers from CURL response?

Posted by Joys of Programming on in Curl, PHP

You can write a simple PHP curl program to download a page. Every HTTP response contains a Header and the contents. In most cases, you will be concerned more about the contents. By default, curl response will give you the contents. But you can also specify that you need the header using the option CURLOPT_HEADER [...]

Tags: , , ,

 
1

How to remove HTTP headers from CURL response?

Posted by Joys of Programming on in Curl, PHP

You can write a simple PHP curl program to download a page. Every HTTP response contains a Header and the contents. In most cases, you will be concerned more about the contents. By default, curl response will give you the contents. But you can also specify that you need only the contents and not the [...]

Tags: , , ,

 
4

Curl: Copying the Webpage contents to Memory buffer

Posted by Joys of Programming on in C/C++, Curl, Web

The webpage contents can be copied to a file or standard output using curl. But in most of the cases, you will need to process the data after downloading the web contents. This can also be done using curl. The CURLOPT_WRITEDATA option must be pointed to the pointer where you want to copy the data. [...]

Tags: , , ,

 
0

URL Decoding in C/C++: curl_easy_unescape

Posted by Joys of Programming on in C/C++, Curl, Linux, Web

URL encoding also called as Percent encoding is useful when certain applications or services expect the data to be of the format “application/x-www-form-urlencoded”. URL Decoding is the opposite process. It converts the encoded URL back to its original form. Justlike urlencode, PHP has function urldecode to perform the decoding done by the percent encoding. But [...]

Tags: , , , ,

 
0

URL Encoding in C/C++: curl_easy_escape

Posted by Joys of Programming on in C/C++, Curl, Linux, Web

URL encoding also called as Percent encoding is useful when certain applications or services expect the data to be of the format “application/x-www-form-urlencoded”. Take for example bit.ly, the URL shortening service expects the URL to be shortened in URL encoded (Percent Encoded). PHP has functions like urlencode to perform percent encoding. But C/C++ has no [...]

Tags: , , , , ,

Copyright © 2009-2012 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.