tags:

views:

76

answers:

2

Hello,

I am a developer in PHP. Nowadays i come across the word cURL in many PHP source codes. Saw wikipedia, but i didn't get the information i want

update : thanks Gordon for the reference

+1  A: 

CURL is a way you can hit a URL from your code to get a html response from it.cURL means client URL which allows you to connect with other URLS and use there responses in your code.

sushil bharwani
+4  A: 

cURL is a library that lets you make HTTP requests in PHP. Everything you need to know about it (and most other extensions) can be found in the PHP manual.

In order to use PHP's cURL functions you need to install the » libcurl package. PHP requires that you use libcurl 7.0.2-beta or higher. In PHP 4.2.3, you will need libcurl version 7.9.0 or higher. From PHP 4.3.0, you will need a libcurl version that's 7.9.8 or higher. PHP 5.0.0 requires a libcurl version 7.10.5 or greater.

You can make HTTP requests without cURL, too, though it requires allow_url_fopen to be enabled in your php.ini file.

// Make a HTTP GET request and print it (requires allow_url_fopen to be enabled)
print file_get_contents('http://www.example.com/');
Johannes Gorset