我从我的 php json 短信 API 收到太多短信



我在我的网站上尝试过PHP JSON请求。 我将其用于短信发送目的。 但是我有很多短信。

<?php
// Your code here!
// Takes raw data from the request
$json = file_get_contents('URL');
// Converts it into a PHP object
$data = json_decode($json,true);
print_r($data);
?>

除了这种方法之外,还有其他方法可以做到这一点吗?

我想用我的后端发送短信。

是的,还有其他方法可以提出请求。与其使用file_get_contents不如使用Guzzle。Guzzle 是向其他 Web 服务发出请求的推荐方式。

最新更新