curl請求指定host ip(指定域名解析的內網某ip)

   

域名www.test.com解析內部多臺ip
$httpHeader = array('Host: www.test.com');
$url = "10.17.2.245/xxx/xxx/t.php";
$ch = curl_init();curl_setopt($ch, CURLOPT_HTTPHEADER, $httpHeader);curl_setopt($ch, CURLOPT_URL, $url);SHELL:curl --silent -H "Host: www.test.com" "192.168.0.1/xxx/xxx/t.php"
相關文章
相關標籤/搜索