function comment_post_sms($comment_id = null) { if ($comment_id != null) { $item_id = Params::getParam('id'); $author = Params::getParam('authorEmail'); $user = User::newInstance()->findByEmail($author); $item = Item::newInstance()->findByPrimaryKey($item_id); $author_phone = $user['s_phone_mobile']; $msg = "Someone commented on " . $item['s_title']; $_credentials = WebSMS::newInstance()->selectWebSMSData(); $token = $_credentials['pk_ws_token']; $signature = $_credentials['ws_signature']; $sa = new smsAPI(); $sa->setCredentials($token, $signature); $res = $sa->sendSms($author_phone, $msg); } }