September 2001
Intermediate to advanced
768 pages
32h 45m
English
string curl_error(int curld) Queries a cURL session for the textual form of the last error encountered.
Returns:
String explaining the last cURL error encountered
Description:
If the last error encountered by the cURL session pointed to by the curld parameter had an associated text string, curl_error returns that text string.
Example:
<php /* Try setting each of the following strings to both valid and invalid * values to see how the errors (or lack thereof) are reported. */ $url = 'ftp://ftp.someserver.com'; $upwd = 'myusername:mypassword'; if (!$curld = curl_init()) { echo "Could not initialize cURL session.\n"; exit; } curl_setopt($curld, CURLOPT_URL, $url); curl_setopt($curld, CURLOPT_USERPWD, $upwd); ... |
Read now
Unlock full access