Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curl_reset(3) [php man page]

CURL_RESET(3)								 1							     CURL_RESET(3)

curl_reset - Reset all options of a libcurl session handle

SYNOPSIS
void curl_reset (resource $ch) DESCRIPTION
This function re-initializes all options set on the given cURL handle to the default values. PARAMETERS
o $ch -A cURL handle returned by curl_init(3). RETURN VALUES
No value is returned. EXAMPLES
Example #1 curl_reset(3) example <?php // Create a curl handle $ch = curl_init(); // Set CURLOPT_USERAGENT option curl_setopt($ch, CURLOPT_USERAGENT, "My test user-agent"); // Reset all previously set options curl_reset($ch); // Send HTTP request curl_setopt($ch, CURLOPT_URL, 'http://example.com/'); curl_exec($ch); // the previously set user-agent will be not sent, it has been reset by curl_reset // Close the handle curl_close($ch); ?> NOTES
Note curl_reset(3) also resets the URL given as the curl_init(3) parameter. SEE ALSO
curl_setopt(3). PHP Documentation Group CURL_RESET(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

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting cURL to output verbose to a file

This is about to drive me crazy. What I want to do is simple: output ALL the verbose information from curl to a file I have read the manual, tried several options and searched this forum but no salvation... I'm using curl -k -Q "command" --user user:passwd --ftp-pasv --ftp-ssl -v... (1 Reply)
Discussion started by: caramandi
1 Replies

2. 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

3. 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

4. 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

5. Shell Programming and Scripting

Php posting help

Hello unix.com I want to use curl to post some logs to a remote server using curl. $ch = curl_init("http://example.com/post/post.php"); curl_setopt($ch, CURLOPT_POST ,1); curl_setopt($ch, CURLOPT_POSTFIELDS ,"FOUT=hash.gif&DATA=$message"); curl_setopt($ch, CURLOPT_HEADER ... (4 Replies)
Discussion started by: galford
4 Replies

6. Red Hat

Posting Multiple Files using cURL

Hi, I am currently in the process of creating a script that will use cURL to HTTP POST the contents of a file on the server. I am able to run the command; curl -d @/path/to/file/filename.dat "https://posting.server.com/test.aspx"to post a single file and this works as expected. The... (4 Replies)
Discussion started by: MarkPaxo
4 Replies

7. 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

8. 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