PHP.nl

curl_init

curl_init

Initialize a cURL session

 **curl_init**  $url

Initializes a new session and returns a cURL handle.

url If provided, the option will be set to its value. This can be set manually using the function. CURLOPT_URL``curl_setopt

Opmerking: > The protocol is disabled by cURL if is set. fileopen_basedir

Returns a cURL handle on success, false on errors.

**Voorbeeld: Initializing a new cURL session and fetching a web page **

<?php

// Initializes a new cURL session
$ch = curl_init();

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

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

?>

curl_multi_init