Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curl_errno(3) [php man page]

CURL_ERRNO(3)								 1							     CURL_ERRNO(3)

curl_errno - Return the last error number

SYNOPSIS
int curl_errno (resource $ch) DESCRIPTION
Returns the error number for the last cURL operation. PARAMETERS
o $ch -A cURL handle returned by curl_init(3). RETURN VALUES
Returns the error number or 0 (zero) if no error occurred. EXAMPLES
Example #1 curl_errno(3) example <?php // Create a curl handle to a non-existing location $ch = curl_init('http://404.php.net/'); // Execute curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_exec($ch); // Check if any error occurred if(curl_errno($ch)) { echo 'Curl error: ' . curl_error($ch); } // Close handle curl_close($ch); ?> SEE ALSO
curl_error(3), Curl error codes. PHP Documentation Group CURL_ERRNO(3)

Check Out this Related Man Page

CURL_SHARE_INIT(3)							 1							CURL_SHARE_INIT(3)

curl_share_init - Initialize a cURL share handle

SYNOPSIS
resource curl_share_init (void ) DESCRIPTION
Allows to share data between cURL handles. PARAMETERS
This function has no parameters. RETURN VALUES
Returns resource of type "cURL Share Handle". EXAMPLES
Example #1 curl_share_init(3) example This example will create a cURL share handle, add two cURL handles to it, and then run them with cookie data sharing. <?php // Create cURL share handle and set it to share cookie data $sh = curl_share_init(); curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE); // Initialize the first cURL handle and assign the share handle to it $ch1 = curl_init("http://example.com/"); curl_setopt($ch1, CURLOPT_SHARE, $sh); // Execute the first cURL handle curl_exec($ch1); // Initialize the second cURL handle and assign the share handle to it $ch2 = curl_init("http://php.net/"); curl_setopt($ch2, CURLOPT_SHARE, $sh); // Execute the second cURL handle // all cookies from $ch1 handle are shared with $ch2 handle curl_exec($ch2); // Close the cURL share handle curl_share_close($sh); // Close the cURL handles curl_close($ch1); curl_close($ch2); ?> SEE ALSO
curl_share_setopt(3), curl_share_close(3). PHP Documentation Group CURL_SHARE_INIT(3)
Man Page