2014-12-01 10:45:30 -08:00

17 lines
426 B
PHP

<?php
class Crunchbutton_Message_Incoming_Response extends Cana_Model {
public static function twilioSms($response, $from) {
header('Content-type: text/xml');
if ($response) {
foreach ($response as $res) {
if ($res->msg) {
$sms .= '<SMS from="'.Phone::dirty($from).'">' . $res->msg . '</SMS>';
}
}
}
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n" .'<Response>' . $sms . '</Response>';
}
}