-1
我嘗試使用下面的腳本張貼到http://iate.europa.eu/請求:捲曲後請求失敗 - 在一個腳本錯誤或受阻?
<?php
$output_array = array();
$post = "method=search&saveStats=true&screenSize=1920x1080&query=bond&valid=Szukaj+&sourceLanguage=en&targetLanguages=pl&domain=&domain=12&typeOfSearch=s&request=";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://iate.europa.eu/SearchByQueryEdit.do');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo $server_output = curl_exec ($ch);
?>
當我運行該腳本,我得到「拒絕訪問您的要求了。因安全原因被拒絕。「
該腳本是否觸發了一些安全機制或者它是否只是做出錯誤的請求?
Thx提前,
盧卡斯
感謝。該腳本將獲取的數據,但不是我想要的數據。它只是迴應起始頁面。你可以看看http://iate.europa.eu/和我的'$ post'變量嗎? –
你還需要幫助嗎?我可以具體來看,明天的問題。 –