我已找到问题的答案。应遵循以下步骤
1>> 确保您拥有 SMS 网关服务提供商提供的 PlaySMS 用户帐户。
2>> 为您的 PlaySMS 帐户启用网络服务并生成网络服务令牌。
3>>现在需要向托管PlaySMS的服务器发送http POST或GET请求。基本请求URL格式如下。
http://"playSMS server here"/index.php?app=ws&u="user name here"&h="WebServices Token here"&op=pv&to="Number here"&msg="Msg HERE"
4>> 更多关于 PlaySMS 网络服务 URL 的信息可以在这里找到
https://github.com/antonraharja/playSMS/blob/master/documents/development/WEBSERVICES.md
5>>根据您的需要准备好带有适当字段的 web 服务 URL 后,您现在只需将请求发送到 PlaySMS 服务器。
6>> 使用 curl() 或 file_get_contents() 发送请求,使用 curl 发送 GET 请求的过程如下:
$url = "http://fakeplaySMSserver.com/index.php?
app=ws&u=Test&h=bfcblablabla&op=pv&to=0335632121&msg=Hello!;
$ch = curl_init($url); // modify the webservices url as per your needs
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);