How to set hostname using php curl for a specific ip

后端 未结 3 1452
野性不改
野性不改 2020-12-13 03:56

Hi I have a server which has several virtual hosts set up on it.

I wanted to make a curl request to this server\'s ip using php. Also I wanted to make this request t

3条回答
  •  悲哀的现实
    2020-12-13 04:46

    For HTTPS sites use CURLOPT_RESOLVE which exists in every PHP version since PHP 5.5.

    Sample output:

    * Added www.example.com:443:172.16.1.1 to DNS cache
    * Hostname www.example.com was found in DNS cache
    *   Trying 172.16.1.1...
    

提交回复
热议问题