PHP intercepts the way to launch SMS content

Source: Internet
Author: User

The code looks like this: $str _tmp  = dadmin_utils::gbkstrsplit ("SMS Content", 700);//content that is too long returns an array of intercepted content  700 refers to the length of the Intercept     $ Total = count ($str _tmp);    $num  = 1;    foreach ($str _tmp as $str)     {    & nbsp if ($total > 1)       {        $STR = $str. "{$num}/{$total}";        $num ++;     }      $sign = Strtoupper (MD5 ($ke Y. $pMobile. $str. $ip));      $url = "SMS Address from=37&sgin=". $sign. " &tel= ". $pMobile." &msg= ". $str;      $ret = file_get_contents ($url);      $result = Json_decode ($ret, True );   }//Send SMS Method function Gbkstrsplit ($string, $len = 1)   {    $length = strlen ($string);//Get length, Kanji Account for three bytes     $RETSTR = ';    $RETARR = array ();    for ($i = 0; $i < $length; $i + +) {      $RETSTR. = Ord ($string [$i]) > 127? $string [$i]. $string [+ + $i]: $string[$i];      $len _tmp = strlen ($retstr);      if ($len _tmp >= $len) {        $RETARR [] = $retstr;        $RETSTR = ';     }   }    IF ($retstr! = ") {      $RETARR [] = $retstr;   }    return $RETARR; } website Beijing constructionhttp://www.wangzhanjianshegs.com/

PHP intercepts the way to launch SMS content

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.