tags:

views:

662

answers:

3

I want to use CURL library but I don't want to install it in a hard way

I just want to do something like this

require_once('curl.php');

I am not sure if this possible or not? and where can I found this CURL class?

thanks

+6  A: 

PHP requires that its built with the cURL library, see:

http://www.php.net/manual/en/curl.installation.php

So you would install libcurl-devel for your system and then compile PHP with

--with-curl

And maybe

--with-curl=/path/to

If you installed it in a non-standard location.

Cody Caughlan
+2  A: 

You're copy of PHP is either going to have to have been built with Curl, or dynamically load it in (because Curl is not originally written in PHP, it's a C library).

Create a simple script that calls phpinfo(). If curl was built in, it should show up on this page.

phpinfo();

dicroce
+1  A: 

There is a Pure PHP Curl implementation called libCurlEmu

Just bear in mind: you should only use this kind of stuff as a last resort if you can't get the extensions to work.

SchizoDuckie