Colect cURL response data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Colect cURL response data

Post by ddragas »

Hi all

Need help on cURL response

I'm sending some information to some URL, and that URL returns me some number. How can I colect that number and store it in veriable

this is code for sending saome information to URL

Code: Select all

$some_URL = "http://www.some-url.com";

					$ch = curl_init($some_URL);
					curl_setopt($ch, CURLOPT_HEADER, 0);
					curl_exec($ch);
					curl_close($ch);

regards ddragas
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

There's a curl option (curl_setopt()) that allows you to tell curl to return the response.
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Post by ddragas »

thank you for reply

regards ddragas
Post Reply