1) { $sp_num = floor(strlen($msg)/300); for ($i=0; $i < $sp_num; $i++) { $sp[$i] = substr($msg,$i*300,300); } foreach ($sp as $sps) { if($isgroup){ $this->post('http://d1.web2.qq.com/channel/send_qun_msg2','r={"group_uin":'.$id.',"content":"[\"'.$sps.'\",[\"font\",{\"name\":\"\",\"size\":10,\"style\":[0,0,0],\"color\":\"000000\"}]]","face":0,"clientid":53999199,"msg_id":0,"psessionid":""}'); }else{ $this->post('http://d1.web2.qq.com/channel/send_buddy_msg2','r={"to":'.$id.',"content":"[\"'.$sps.'\",[\"font\",{\"name\":\"\",\"size\":10,\"style\":[0,0,0],\"color\":\"000000\"}]]","face":0,"clientid":53999199,"msg_id":0,"psessionid":""}'); } } }else{ if($isgroup){ $this->post('http://d1.web2.qq.com/channel/send_qun_msg2','r={"group_uin":'.$id.',"content":"[\"'.$msg.'\",[\"font\",{\"name\":\"\",\"size\":10,\"style\":[0,0,0],\"color\":\"000000\"}]]","face":0,"clientid":53999199,"msg_id":0,"psessionid":""}'); }else{ $this->post('http://d1.web2.qq.com/channel/send_buddy_msg2','r={"to":'.$id.',"content":"[\"'.$msg.'\",[\"font\",{\"name\":\"\",\"size\":10,\"style\":[0,0,0],\"color\":\"000000\"}]]","face":0,"clientid":53999199,"msg_id":0,"psessionid":""}'); } } return 1; } }