Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curl_multi_strerror(3) [php man page]

CURL_MULTI_STRERROR(3)							 1						    CURL_MULTI_STRERROR(3)

curl_multi_strerror - Return string describing error code

SYNOPSIS
string curl_multi_strerror (int $errornum) DESCRIPTION
Returns a text error message describing the given CURLM error code. PARAMETERS
o $errornum - One of the CURLM error codes constants. RETURN VALUES
Returns error string for valid error code, NULL otherwise. EXAMPLES
Example #1 curl_multi_strerror(3) example <?php // Create cURL handles $ch1 = curl_init("http://example.com"/); $ch2 = curl_init("http://php.net/"); // Create a cURL multi handle $mh = curl_multi_init(); // Add the handles to the multi handle curl_multi_add_handle($mh, $ch1); curl_multi_add_handle($mh, $ch2); // Execute the multi handle do { $status = curl_multi_exec($mh, $active); // Check for errors if($status > 0) { // Display error message echo "ERROR! " . curl_multi_strerror($status); } } while ($status === CURLM_CALL_MULTI_PERFORM || $active); ?> SEE ALSO
curl_strerror(3), cURL error codes. PHP Documentation Group CURL_MULTI_STRERROR(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

7 More Discussions You Might Find Interesting

1. Programming

cURL and cgi

I have a CGI application done in c++ that communicates with PayPal. I've had an issue where the application dies when I try to perform a cURL operation. Upon further inspection it seems that I can run cURL examples from the command line. Upon even further inspection it seems that I can run... (8 Replies)
Discussion started by: tatebn
8 Replies

2. UNIX for Dummies Questions & Answers

Using cURL to save online search results

Hi, I'm attacking this from ignorance because I am not sure how to even ask the question. Here is the mission: I have a list of about 4,000 telephone numbers for past customers. I need to determine how many of these customers are still in business. Obviously, I could call all the numbers.... (0 Replies)
Discussion started by: jccbin
0 Replies

3. Shell Programming and Scripting

Logging Via Terminal using cURL

I am having trouble logging in to an account via cURL in the terminal. I need to be able to log in to this page then get a query result from another. I need to do this as a shell script all at once. Im not sure how to handle cookies with terminal & have found very little example. curl ... (1 Reply)
Discussion started by: handell
1 Replies

4. Shell Programming and Scripting

FTP using cURL

Hi I am trying to fetch a file from a remote location and download it into a local directory ...i was previously doing it quite simply using ftp but now i need to do the same using the cURL tool ...Here i am not getting an option to specify a directory name i am trying the following but... (0 Replies)
Discussion started by: jamshedj
0 Replies

5. Shell Programming and Scripting

cURL and variables

I have a spent a day with Google trying to figure this one out and have decided its time to ask the experts... I'm running OS X 10.6 I need to use cURL to FTP a file. I have been successful send the file from the command line when I know the filename. My problem is that the filename changes... (2 Replies)
Discussion started by: fmSimplicity
2 Replies

6. Shell Programming and Scripting

Register account using cURL

Hello! I am trying to register account in Dropbox using cURL. There are a lot of existing examples doing POST and other useful stuff, however it doesn't work for me. Using formpost.pl script i got info: --- FORM report. Uses POST to URL "/register" Input: NAME="t"... (0 Replies)
Discussion started by: diabolusss
0 Replies

7. UNIX for Dummies Questions & Answers

How to include cURL library?

Hi, I've got a project to write a C++ code to open a webpage,read the content and write it in a file. I'm using cURL and compiling the code using G++ in unix. I'm getting compilation error as: "cURL.h: no file or directory". Can some one please tell me how to install/link this library in... (3 Replies)
Discussion started by: Ribosome
3 Replies