Sunday, February 27, 2011

PHP CURL Installation in Windows and Linux

PHP has a very powerful library to fetch data from remote servers which is nothing but CURL. It stands for Client URL.

PHP must be compiled with curl library to make use of these libraries.

In Linux, you need to compile PHP --with-curl[=DIR] where DIR is the location of the directory containing the lib and include directories. In include folder there should be a folder named curl which should contain the easy.h and curl.h files. It should be a file named libcurl.a located in the lib folder. From PHP 4.3 you can configure PHP to use cURL for URL streams -- with-curlwrappers.

For Windows, go to PHP environment path, WINDOWS/System32 folder is the default one for windows XP operating system. You must copy php_curl.dll to this folder.

In php.ini file remove ";" from the line extension=php_curl.dll

Restart Apache services. Then cURL will be enbled

No comments:

Post a Comment