0
我的腳本中有一段代碼,但每次運行時都使用我的IP地址。我如何使它使用用戶的IP地址?我正在閱讀有關curl_setopt()
,它允許您設置IP地址。有人可以幫助我嗎?用戶IP用於捲曲而不是服務器IP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '' . $stuff_link[0] . '');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, '' . $stuff_refurl . '');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
// curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, false);
$html = curl_exec($ch);
curl_close ($ch);
每次我上http://astonishin.com測試的IP始終是相同的 – user2002220