note 126003 added to book.curl
| From: | zle dot lc at main dot php dot net | Date: | Tue, 13 Apr 2021 02:15:45 +0000 |
| Subject: | note 126003 added to book.curl | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216276@lists.php.net to get a copy of this message | ||
Sharing is caring, handles included.
<?php
$url_one = "php.net";
$url_two = "";
$user_agent = 'Mozilla HotFox 1.0';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url_one.$url_two);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_NOBODY, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$res = curl_exec($ch);
curl_close($ch);
$url_two = "lazyphp.net";
$url_one = "";
$res_two = curl_exec($ch);
curl_close($ch);
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 2603:900a:230b:4d00:a238:35fb:3b0b:4551)
----
Manual Page -- https://php.net/manual/en/book.curl.php
Edit -- https://main.php.net/note/edit/126003
Del: integrated -- https://main.php.net/note/delete/126003/integrated
Del: useless -- https://main.php.net/note/delete/126003/useless
Del: bad code -- https://main.php.net/note/delete/126003/bad+code
Del: spam -- https://main.php.net/note/delete/126003/spam
Del: non-english -- https://main.php.net/note/delete/126003/non-english
Del: in docs -- https://main.php.net/note/delete/126003/in+docs
Del: other reasons-- https://main.php.net/note/delete/126003
Reject -- https://main.php.net/note/reject/126003
Search -- https://main.php.net/manage/user-notes.php