function sms_devel_virtualgw_ahah_send in SMS Framework 7
Same name and namespace in other branches
- 6.2 modules/sms_devel/sms_devel.virtualgw.inc \sms_devel_virtualgw_ahah_send()
- 6 modules/sms_devel/sms_devel.virtualgw.inc \sms_devel_virtualgw_ahah_send()
Performs an ajax send to virtual gateway.
1 string reference to 'sms_devel_virtualgw_ahah_send'
- sms_devel_menu in modules/
sms_devel/ sms_devel.module - Implements hook_menu().
File
- modules/
sms_devel/ sms_devel.virtualgw.inc, line 240 - Virtual Gateway for the sms_devel module of the SMS Framework.
Code
function sms_devel_virtualgw_ahah_send() {
$result = drupal_http_request(url('sms/virtualgw/receiver', array(
'absolute' => TRUE,
)), array(
'headers' => array(
'Content-Type' => 'application/x-www-form-urlencoded',
),
'method' => 'POST',
'data' => http_build_query(array(
'number' => $_POST['sms_devel_virtualgw_from'],
'message' => $_POST['sms_devel_virtualgw_message'],
'gw_number' => $_POST['sms_devel_virtualgw_to'],
), '', '&'),
));
// Return a good status
drupal_json_output(array(
'status' => TRUE,
));
}