문자 인증 코드

1738 단어
public function index () {$sn = "계정";
    $pwd = " ";
    
    $mobile = ' ';
    
    $content = ' , , 12345【group401】';
    
    $ext = '';
    
    $rrid = '';
    
    $stime = '';
    
    $stype = 1;
    
    $ssafe = 1;
    
    $scode = 1; // 1 UTF-8,2 GB2312
    
    $MARK = "|";
    
    $Md5key = "dfg78er";
    
    $Md5Sign = md5 ( $sn . $MARK . $pwd . $MARK . $mobile . $MARK . $content . $MARK . $ext . $MARK . $rrid . $MARK . $stime . $MARK . $stype . $MARK . $ssafe . $MARK . $scode . $MARK . $Md5key );
    
    $target = "http:// sdk ";
    
    $subdate = "sn=" . $sn . "&pwd=" . $pwd . "&Md5Sign=" . $Md5Sign . "&mobile=" . $mobile . "&content=" . urlencode ( $content ) . "&ext=" . $ext . "&stime=" . $stime . "&rrid=" . $rrid . "&stype=" . $stype . "&ssafe=" . $ssafe . "&scode=" . $scode;
    
    $sendMsgID = $this->SudasSmsPost ( $target, $subdate );
    
    if ($sendMsgID > 1) {
        echo '     ' . $sendMsgID;
    } else {
        
        echo ' ,   ' . $sendMsgID;
    }
}
public function SudasSmsPost($url, $request) {
    $output = true;
    
    $show_header = false;
    
    $ch = curl_init ();
    
    curl_setopt ( $ch, CURLOPT_URL, $url );
    
    curl_setopt ( $ch, CURLOPT_POSTFIELDS, $request ); //  
    
    curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, $output ); //  
    
    curl_setopt ( $ch, CURLOPT_HEADER, $show_header ); //  
    
    $ReturnData = curl_exec ( $ch );
    
    curl_close ( $ch );
    
    return $ReturnData;
}

좋은 웹페이지 즐겨찾기