Sms 通过http api获取我的clickatell号码上的传入消息

Sms 通过http api获取我的clickatell号码上的传入消息,sms,sms-gateway,clickatell,Sms,Sms Gateway,Clickatell,我想当有人用我的clickatell号码给我发信息时,我想用我的电子邮件发送此信息。我正在使用http请求。我已经检查了http api pdf,其中只显示了身份验证和发送消息url。我想通过我在脚本中获取消息的方式获得url 我正在使用curl函数请求页面 $curl = curl_init(); // Set some options - we are passing in a useragent too here curl_setopt_array($curl, ar

我想当有人用我的clickatell号码给我发信息时,我想用我的电子邮件发送此信息。我正在使用http请求。我已经检查了http api pdf,其中只显示了身份验证和发送消息url。我想通过我在脚本中获取消息的方式获得url

我正在使用curl函数请求页面

    $curl = curl_init();
     // Set some options - we are passing in a useragent too here
  curl_setopt_array($curl, array(
 CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'http://api.clickatell.com/http/auth?user=demo& 
  password=demo&api_id=123432',
CURLOPT_USERAGENT => 'Codular Sample cURL Request',
   CURLOPT_POST => 1,
 CURLOPT_POSTFIELDS => array(
    item1 => 'value',
    item2 => 'value2'
)
));
 // Send the request & save response to $resp
   $resp = curl_exec($curl);
 print_r($resp);
  // Close request to clear up some resources
   curl_close($curl);

它正在工作并返回会话id和ok状态。类似地,我可以获取传入消息吗?

Clickatell有一个双向服务,允许您从他们的服务接收消息,并且可以阅读他们的实现文档

为了通过电子邮件接收通知,我建议选择Clickatell服务器的
HTTP回调
。这将允许您编写一个小脚本,将内容转换为电子邮件

希望这对你有帮助