0
我有此問題請。 我在這裏使用這個腳本來發送自動短信:無法使用file_get_content或cURL上手php腳本
<?php
function get_data($url) {
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$returned_content = get_data('http://url.goes.here:8080/bulksms/bulksms?username=user&passwd=password&type=0&dlr=1&destination=phone&source=FLM&message=hello');
?>
的問題是,如果我直接提交URL我得到的東西,如:
1701|355662080090|a2406d38-1baf-42a2-a1a5-e5798859e400
而且短信到達我的電話,但如果我使用上面的方法,我不會得到短信。 任何人都可以建議我爲什麼是這樣的? 謝謝..
so'file_get_contents(「http://url.goes.here:8080/bulksms/bulksms?username=user&passwd=password&type=0&dlr=1&destination=phone&source=FLM&message=hello」)'不起作用?也許是因爲'allow_url_fopen'被禁用? –
你能幫我一個辦法嗎?它不依賴於禁用或啓用的功能。 –
問題是,這是一個外部網站,我沒有權利,我無法啓用或禁用功能 –