コード例 #1
0
 public function get_authentication_param($data)
 {
     require_once 'config/config.comm.php';
     $url = _INTERFACE_HUIFU_URL;
     $res = curl_send($url, http_build_query($data));
     return json_decode($res, true);
     //return $res;
 }
コード例 #2
0
function send_sms($mobile_no, $message, $company_id = false)
{
    $CI =& get_instance();
    $company_id = $CI->session->userdata('companyid');
    /*$secure_app_key=database_variable('secure_app_key');
    	$secure_sms=database_variable('secure_sms');	*/
    if ($company_id != '') {
        $secure_app_key = database_variable('secure_app_key', $company_id);
        $secure_sms = database_variable('secure_sms', $company_id);
    }
    $message = urlencode($message);
    /* application based key */
    /* user based key */
    $url = SMSAPP_API_SENDSMS . "securekey=" . $secure_app_key . "&token=" . $secure_sms . "&to=" . $mobile_no . "&message=" . $message;
    $response = curl_send($url);
    if (strpos(strtolower($response), 'sent') === false) {
        return false;
    } else {
        return true;
    }
}
コード例 #3
0
ファイル: class.status.php プロジェクト: GStepOne/CI
 *
 * @access  private
 */
$request_time = date('Y-m-d H:i:s');
$request_data = '';
$link = '';
$msgid = $argv[1] ? $argv[1] : '';
if (empty($msgid)) {
    echo 'please add msgid ';
    exit;
}
//上线注意这里
$url = "http://www.10690300.com/http/sms/Report";
$post['message'] = '<?xml version="1.0" encoding="UTF-8"?><message><account>dh51111</account><password>' . md5('3mL?IW~*') . '</password><msgid>' . $msgid . '</msgid><phone></phone></message>';
$post_string = http_build_query($post, '', '&');
$link = curl_send($url, $post_string);
unset($post_string, $post);
//记录请求回执日志
$response_time = date('Y-m-d H:i:s');
if (isset($link['body'])) {
    $body = $link['body'];
    $response_data = print_R($body, true);
    unset($link);
    $has_response = 1;
} else {
    $response_data = print_R($link, true);
}
print_R($response_data);
exit;
function curl_send($url, $post_data = '', $timeout = 3, $headers = array(), $crt_path = false)
{
コード例 #4
0
ファイル: global_helper.php プロジェクト: shripadv/leadmgt
function send_sms($mobile_no, $message)
{
    $message = urlencode($message);
    $url = SMSAPP_API_SENDSMS . "securekey=" . SMSAPP_SECUREKEY . "&token=" . SMSAPP_TOKEN . "&to=" . $mobile_no . "&message=" . $message;
    $response = curl_send($url);
    if (strpos(strtolower($response), 'sent') === false) {
        return false;
    } else {
        return true;
    }
}
コード例 #5
0
ファイル: function.comm.php プロジェクト: GStepOne/CI
function goHuiFuPlant($data)
{
    require_once 'config/config.comm.php';
    $url = _INTERFACE_HUIFU_URL;
    //http://plantformtest.cailai.com/huifu/
    $res = curl_send($url, http_build_query($data));
    $arr = json_decode($res, true);
    return $arr;
    //http_build_query($data),$data
}