This article mainly and everybody introduced the PHP interception launches the message content method, the need friend can refer to, hoped can help everybody.
The specific code looks like this:
$str _tmp = dadmin_utils::gbkstrsplit ("message content", 700);//The content is too long to return an array after intercepting the content 700 refers to the length of the interception $total = count ($str _tmp); $num = 1; foreach ($str _tmp as $str) {if ($total > 1) {$str = $str. "{$num}/{$total}"; $num + +; } $sign = Strtoupper (MD5 ($key. $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, Chinese characters 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; }