1 回答

TA貢獻1853條經驗 獲得超6個贊
您可以使用 php curl 從服務器提交表單(或發(fā)送請求)。
在login.php從數(shù)據(jù)庫中檢索信息后,您可以提交curl請求,如下代碼:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.silverstreet.com/send.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, http_build_query(
? ? array(
? ? ? ? "username" => "<username>",
? ? ? ? "password" => "<password>",
? ? ? ? "sender" => "hello",
? ? ? ? "body" => "hello world.",
? ? ? ? "destination" => "1234567890,1234567891"
? ? )
));
$result = curl_exec($ch);
if(curl_errno($ch)){ echo curl_errno($ch); }
curl_close($ch));
?>
- 1 回答
- 0 關注
- 133 瀏覽
添加回答
舉報