I have a clickatell account and i am trying to receive messages in php using it. I understand that I need to setup a callback url on it and i have added that. In the callback url, i have added the following code snippet
<?php
$req = print_r($_REQUEST, true);
$req = wordwrap($req, 70, "\r\n");
error_log($req, 3, "test.log");
mail("<my-email-address>", "sms test", $req);
When i call the url directly, it is working as it should and sending me the mail as well as logging to the error log file. However, when i receive a text message in clickatell, nothing happens (no mail/log).
Am i missing something here? Any pointers are appreciated. Let me know if you need any additional details which would help to resolve/understand the problem.
Thanks
Copyright Notice:Content Author:「pinaki」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/27926870/clickatell-callback-url-to-receive-messages-not-working