PHP run appears call to undefined function curl

Source: Internet
Author: User
Tags curl
Run PHP under Ubuntu, always prompt call to undefined function curl_init (), reason not to turn: Php5-curl

Curl related content See: Http://packages.ubuntu.com/zh-cn/intrepid/php5-curl

CURL is a library of getting files from FTP, GOPHER, HTTP server.

PHP5 is a html-embedded scripting language. Much of their syntax is borrowed from C, Java and Perl with a couple of the unique php-specific features thrown in. The goal of the language is to allow web developers to write dinamically generated pages quickly. This version of PHP5 is built with the Suhosin patch.

H1>

(PHP 4 >= 4.0.2)

Curl_init--Initializes a curl session

Describe

int curl_init ([string URL])

The Curl_init () function Initializes a new session and returns a curl handle for use by curl_setopt (), curl_exec (), and the Curl_close () function. If an optional parameter is provided, the CURLOPT_URL option is set to the value of this parameter. You can use the curl_setopt () function to manually set.
Example 1. Initializes a new Curl session and retrieves a Web page

<?php
$ch = Curl_init ();

curl_setopt ($ch, Curlopt_url, "http://www.zend.com/");
curl_setopt ($ch, Curlopt_header, 0);

Curl_exec ($ch);

Curl_close ($ch);
?>



See also: Curl_close (), curl_setopt ()

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.