PhpDig.net

What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.




curl_errno

Name

curl_errno — Queries a cURL session for the last error code encountered.

Synopsis

int curl_errno(curld);
int curld: Handle of cURL session to query

Returns

Integer value of the last error code encountered by the cURL session

Description

Queries the cURL session indicated by the curld parameter for the last error code encountered. A set of constants are defined by the cURL extension to make utilizing these values easier:

CURLE_OK

The last operation executed successfully.

CURLE_COULDNT_CONNECT

The cURL session found the requested host, but failed to connect to it.

CURLE_COULDNT_RESOLVE_PROXY

The given proxy server's hostname could not be resolved.

CURLE_COULDNT_RESOLVE_HOST

User attempted to access a resource on a host whose name could not be resolved.

CURLE_FAILED_INIT

The session could not be initialized.

CURLE_FILE_COULDNT_READ_FILE

The requested file could not be read from the local filesystem.

CURLE_FTP_ACCESS_DENIED

Access was denied to a requested resource on an FTP server.

CURLE_FTP_BAD_DOWNLOAD_RESUME

An aborted download could not be resumed.

CURLE_FTP_CANT_GET_HOST

cURL could not resolve the host indicated by the server's 227 response.

CURLE_FTP_CANT_RECONNECT

cURL could not connect to the new server indicated by the server's 227 response.

CURLE_FTP_COULDNT_GET_SIZE

The FTP server returned an error when trying to use the SIZE command. This command is an extension to the FTP protocol and may not be supported.

CURLE_FTP_COULDNT_RETR_FILE

The FTP server returned an error when trying to use the RETR command.

CURLE_FTP_COULDNT_SET_ASCII

An attempt to set the FTP transfer mode to ASCII failed.

CURLE_FTP_COULDNT_SET_BINARY

An attempt to set the FTP transfer mode to binary failed.

CURLE_FTP_COULDNT_STOR_FILE

The FTP server returned an error when trying to use the STOR command.

CURLE_FTP_COULDNT_USE_REST

The FTP server returned an error when trying to use the REST command.

CURLE_FTP_PORT_FAILED

The FTP server returned an error when trying to use the PORT command.

CURLE_FTP_QUOTE_ERROR

The FTP server returned an error when trying to use the QUOTE command.

CURLE_FTP_USER_PASSWORD_INCORRECT

The username or password given for an FTP resource was incorrect.

CURLE_FTP_WEIRD_227_FORMAT

cURL could not understand the FTP server's 227 response.

CURLE_FTP_WEIRD_PASS_REPLY

cURL could not understand the FTP server's response to the given password.

CURLE_FTP_WEIRD_PASV_REPLY

cURL could not understand the FTP server's response to a PASV command.

CURLE_FTP_WEIRD_SERVER_REPLY

An attempted access of a resource on an FTP server resulted in a response that the cURL library didn't understand.

CURLE_FTP_WEIRD_USER_REPLY

cURL could not understand the FTP server's response to the given username.

CURLE_FTP_WRITE_ERROR

The FTP server reported that the attempted file-write operation did not complete successfully.

CURLE_FUNCTION_NOT_FOUND

Could not find an LDAP function required for the requested operation.

CURLE_HTTP_NOT_FOUND

The given HTTP resource could not be located on the server. This occurs when the server was successfully located and connected, but the given URL doesn't point to a valid resource on the server - that is, an HTTP 404 was received. This error will only be issued if CURLOPT_FAILONERROR has been set to TRUE.

CURLE_HTTP_RANGE_ERROR

The given range options for an HTTP transfer did not work.

CURLE_HTTP_POST_ERROR

A proper POST request could not be constructed from the given data.

CURLE_LDAP_CANNOT_BIND

The session could not bind to the requested LDAP directory.

CURLE_LDAP_SEARCH_FAILED

The requested LDAP search operation failed.

CURLE_LIBRARY_NOT_FOUND

The LDAP library could not be found.

CURLE_MALFORMAT_USER

The username was incorrectly formatted.

CURLE_OPERATION_TIMEOUTED

The last operation did not complete within the given time constraints and timed out. Note that as of this writing, just prior to the release of PHP 4.0.5, the error constant really is CURLE_OPERATION_TIMEOUTED, and not CURLE_OPERATION_TIMEDOUT as you might think. See CURLOPT_TIMEOUT in the curl_setopt() list of constants.

CURLE_OUT_OF_MEMORY

There was a problem allocating enough memory for the requested operation.

CURLE_PARTIAL_FILE

The requested resource was only partially retrieved and written to the destination file.

CURLE_READ_ERROR

Could not read an input file, such as that set with CURLOPT_INFILE.

CURLE_SSL_CONNECT_ERROR

Could not connect with the requested SSL server.

CURLE_UNSUPPORTED_PROTOCOL

The requested protocol (FTP, HTTP, etc.) was not recognized by the cURL library.

CURLE_URL_MALFORMAT

The URL given was malformed and cannot be used.

CURLE_URL_MALFORMAT_USER

The username in the URL was incorrectly formatted.

CURLE_WRITE_ERROR

cURL could not write to the specified file.



For examples of the use of curl_errno() , see the following function, curl_error() .




PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). The authors of this book have elected not to choose any options under the OPL. This online book was obtained from http://www.fooassociates.com/phpfer/ and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.