note 107540 added to function.curl-exec
| From: | ggarmento at yahoo dot com | Date: | Thu, 16 Feb 2012 11:49:02 +0000 |
| Subject: | note 107540 added to function.curl-exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186163@lists.php.net to get a copy of this message | ||
I am a more tenacious designer than I am a code monkey; but the sample curl function ended an
exhaustive four hour search.
I needed to execute a Search URL in a WordPress 3 page in order to return some Real Estate results
and my "unnamed" shared server had fopen and load() shut down.
The code below was the only code in the whole page; the WP3 theme wrapped around the search results
like a mother and child at feeding time.
[code]
<?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, 0);
// grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
?>
[code]
Whoot!!
----
Server IP: 69.147.83.197
Probable Submitter: 96.24.42.60
----
Manual Page -- http://www.php.net/manual/en/function.curl-exec.php
Edit -- https://master.php.net/note/edit/107540
Del: integrated -- https://master.php.net/note/delete/107540/integrated
Del: useless -- https://master.php.net/note/delete/107540/useless
Del: bad code -- https://master.php.net/note/delete/107540/bad+code
Del: spam -- https://master.php.net/note/delete/107540/spam
Del: non-english -- https://master.php.net/note/delete/107540/non-english
Del: in docs -- https://master.php.net/note/delete/107540/in+docs
Del: other reasons-- https://master.php.net/note/delete/107540
Reject -- https://master.php.net/note/reject/107540
Search -- https://master.php.net/manage/user-notes.php