コード例 #1
0
ファイル: functions.php プロジェクト: jhalendra/classmandu
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);
    }
}
コード例 #2
0
ファイル: sms.php プロジェクト: sexseses/meilimei_old_api
 /**
  * 余额查询  (注:此方法必须为已登录状态下方可操作)
  * @return double 余额
  */
 function getBalance()
 {
     $sms = new smsAPI();
     $result = $sms->getParentBalance();
     return $result['sms']['amount'];
 }