note 102054 deleted from function.curl-init by danbrown
| From: | danbrown@php.net | Date: | Tue, 25 Jan 2011 13:59:14 +0000 |
| Subject: | note 102054 deleted from function.curl-init by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-176295@lists.php.net to get a copy of this message | ||
Note Submitter: jeffmixpute
----
a small example for getting information
by initialising/using curl
// initialsie curl
$var = curl_init();
//set URL
$url = "http://localhost/service.php";
// set Get options
curl_setopt($var, CURLOPT_URL, $url);
curl_setopt($var, CURLOPT_RETURNTRANSFER, true);
curl_setopt($var, CURLOPT_HTTPGET, true);
// execute response
$response = curl_exec($var);
// close curl
curl_close($var);