note 11470 deleted from function.curl-setopt by cmb
| From: | cmb@php.net | Date: | Sun, 29 Dec 2019 10:20:23 +0000 |
| Subject: | note 11470 deleted from function.curl-setopt by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213673@lists.php.net to get a copy of this message | ||
Note Submitter: fil at rezox dot com
----
If you want to connect to a secure server for posting info/reading info, you need to make cURL with
the openSSL options. Then the sequence is nearly identical to the previous example (except
http_S_://, and possibly add the useragent):
<?php
curl_setopt($ch, CURLOPT_URL,"https://example.com");
//some sites only accept your request if your browser looks legit, so send a useragent profile...
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT
5.0)");
?>