note 108391 rejected from function.curl-setopt by salathe
| From: | salathe@php.net | Date: | Mon, 23 Apr 2012 13:11:42 +0000 |
| Subject: | note 108391 rejected from function.curl-setopt by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187296@lists.php.net to get a copy of this message | ||
Note Submitter: rha2180 at yahoo dot com
----
OK, I got it.
<?php
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// grab URL and pass it to the browser
$result = curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
echo $result;
?>
Silly question