How to open php Curl function library

Source: Internet
Author: User
Tags curl

windows open Method:

1, copy the PHP directory Libeay32.dll, Ssleay32.dll, Php5ts.dll, php_curl.dll files to the System32 directory.
2, modify the php.ini: Configure good extension_dir, remove extension = Php_curl.dll before the semicolon.

3, back up Apache.

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 Open method: Method One

Install Curl
# wget http://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

Installing PHP

Just turn on the switch--with-curl=/usr/local/curl

It's OK.

This expansion library is still very good, and is a useful alternative to fsockopen and so on. Method II into the installation of the original php source directory,

CD ext
CD Curl
Phpize
./configure--with-Curl =dir
Make
A file of Curl . So will be generated under phpdir/ext/Curl /moudles/.

Copy the Curl . So file to the extensions configuration directory and modify php . ini.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.