Easy Tutorial
❮ Php Mysql Update Func Curl_Multi_Getcontent ❯

PHP curl_exec Function

PHP cURL Reference Manual

(PHP 4 >= 4.0.2, PHP 5)

curl_exec — Execute a cURL session


Description

mixed curl_exec ( resource $ch )

Executes the given cURL session.

This function should be called after initializing a cURL session and setting all options.


Parameters

ch

A cURL handle returned by curl_init().


Return Values

Returns TRUE on success, or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, it returns the result on success, FALSE on failure.


Examples

Fetch a web page

<?php
// Create a cURL resource
$ch = curl_init();

// Set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.w3cschool.cc/");
curl_setopt($ch, CURLOPT_HEADER, 0);

// Grab URL and pass it to the browser
curl_exec($ch);

// Close cURL resource, and free up system resources
curl_close($ch);
?>

PHP cURL Reference Manual

❮ Php Mysql Update Func Curl_Multi_Getcontent ❯