http - get the response from SMS gateway in php -
this question has answer here:
- how send post request php? 10 answers
how response sms gateway (in general) in site?
the documentation sms gateway should describe how data presented via http; format specific sms gateway, there no standard.
is gateway maintained third party? if 1 installed how presents information may part of configuration , issue off topic here.
assuming gateway correctly configured, can see data presented gateway in $_request. in (very obscure) cases data may presented in raw post.
just capture full request see how data being presented. easiest if php running mod_php in apache (you did not say) this:
<?php $log=tempnam("/tmp", 'mo_sms'); $output="started " . date('r') . "\n"; $headers = apache_request_headers(); foreach ($headers $header => $value) { $output.="$header : $value\n"; } $output.="\n"; while (!feof(stdin)) { $output.=fgets($tdin); } file_put_contents($log, $output);
note not complete transaction gateway - expecting sort of acknowledgement data has been delivered (but may treat http 200 such).
Comments
Post a Comment