php结合飞信 免费天气预报短信

2019-04-10 11:21:10于海丽


                //大信息量处理
                if (mb_strlen($info)>171){
                    $sum=ceil(mb_strlen($info)/168)-1;
                    for($i=0;$i<=$sum;$i++){
                        $starj=168*$i;
                        $qInfo=mb_substr($info,$starj,168);
                        $n=$i+1;
                        foreach($tel[$city['id']] as $val){
                            $url="http://sms.api.bz/fetion.php?username=".$Fetion['user']."&password=".$Fetion['pass']."&sendto=".$val."&message=".urlencode("天气预报[".$n."],"."明天".date("Y年m月d日")." ".$city['name']." ".$qInfo);
                            @file_get_contents($url);
                        }
                    }
                }else{
                    foreach($tel[$city['id']] as $val){
                        $url="http://sms.api.bz/fetion.php?username=".$Fetion['user']."&password=".$Fetion['pass']."&sendto=".$val."&message=".urlencode("天气预报,明天".date("Y年m月d日")." ".$city['name']." ".$info);
                        @file_get_contents($url);
                    }
                }
相关文章 大家在看