Transferred from: http://jingyan.baidu.com/article/00a07f38909c6b82d028dc83.html
windows open Method:
Copy the PHP directory Libeay32.dll, Ssleay32.dll, Php5ts.dll, php_curl.dll files to the System32 directory. (Php_curl.dl under Ext file)
Modify PHP.ini: Configure Extension_dir, remove extension = Php_curl.dll before the semicolon.
Re-start Apache or IIS.
test whether the installation was successful:<?php
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, "http://www.google.cn");
curl_setopt ($ch, curlopt_header,1);
Curl_exec ($ch);
Curl_close ($ch);
?>
Linux under Open method:
Method One
Installing Curl
# wgethttp://curl.haxx.se/download/curl-7.17.1.tar.gz
# TAR-ZXF Curl-7.17.1.tar.gz
#./configure--prefix=/usr/local/curl
# make; Make install
Install PHP
Just turn on the switch--with-curl=/usr/local/curl
You can do it.
This extension is great, it's an effective alternative to fsockopen and so on.
Method Two
Go to the source directory where the original PHP is installed,
CD ext
CD Curl
Phpize
./configure
--with-curl=dir
Make
The curl.so file is generated under phpdir/ext/curl/moudles/.
Copy the curl.so file to the extensions configuration directory and modify the php.ini.
PHP installation Environment, the server does not support CURL_EXEC solution