Home > PHP > Function > cURL > curl_init()

curl_init()

curl_init - Initialize a cURL session

Syntax

resource curl_init (string $url)

Arguments

  • url - If provided, the CURLOPT_URL option will be set to its value. You can manually set this using the curl_setopt() function.

Description

Initializes a new session and return a cURL handle for use with the curl_setopt(), curl_exec(), and curl_close() functions.

Version

PHP 4.0.2, 5

Return value

Returns a cURL handle on success, FALSE on errors.