這個php代碼是使用ajax執行的。執行頭語句後,Ajax請求不會返回。從php轉到url並執行其餘的代碼
if(is_numeric($phone) && strlen($phone)==10){
$text = "Hi $name, your account created at hhhhh. Check your email to get updates. Thank you";
$sms = "http://domain.com/msg.php?user=******&pass=*****&sender=***&phone=$phone&text=$text&priority=****&stype=***";
header("Location: $sms");
}
$url = "done";
echo $url;
我需要的是什麼,只是去$sms
網址在PHP,並呼籲通過Ajax這個代碼執行時的剩餘部分。是否有任何其他方法比標題去鏈接和執行PHP中的其餘代碼。
做一些關於[curl]的研究(https://www.google.com/search?q=php%20curl) – 2015-02-08 17:39:03
你爲什麼通過GET請求發送密碼? – ntzm 2015-02-08 17:41:09
短信網關API是這樣的。 – user3209025 2015-02-08 17:46:09