Microsoft small ice non-Api ice chat interface PHP
"$ Contents", 'rl '=> '2', 'uid' => '000000', 'send' => 'send '); // curl sends the message in simulated mode if ($ _ GET [msg]) {} else {echo 'the content you submitted is blank! '; Exit;} $ curl = curl_init (); // initialize the curl module curl_setopt ($ curl, CURLOPT_URL ,' http://weibo.cn/msg/do/post?st=7b1272 '); // The submitted login address curl_setopt ($ curl, CURLOPT_HEADER, 0); // whether to display the header information curl_setopt ($ curl, CURLOPT_RETURNTRANSFER, 1 ); // whether to automatically display the returned information curl_setopt ($ curl, CURLOPT_COOKIE, SUB); curl_setopt ($ curl, CURLOPT_COOKIEJAR, $ cookie ); // Set the Cookie information to save in the specified file: curl_setopt ($ curl, CURLOPT_POST, 1); // submit curl_setopt ($ curl, CURLOPT_POSTFIELDS, http_build_query ($ post) in post mode )); // curl_setopt ($ curl, CURLOPT_FOLLOWLOCATION, 1); curl_exec ($ curl); // execute cURL curl_close ($ curl); // disable cURL resources, and release the system resource sleep (1); // read the reply $ ch = curl_init (); curl_setopt ($ ch, CURLOPT_URL ,' http://m.weibo.cn/msg/messages?uid=5175429989&page=1 '); Curl_setopt ($ ch, CURLOPT_HEADER, 0); curl_setopt ($ ch, batch, 1); curl_setopt ($ ch, CURLOPT_COOKIE, SUB); curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, 1); $ ct = curl_exec ($ ch); curl_close ($ ch); $ ct = json_decode ($ ct, 1); // print_r ($ ct ); $ m = $ ct [data] [0] [text]; // replace $ m = str_replace ("share voice", "the recipient sends you a speech. ", $ M); $ m = str_replace (" share Image "," the recipient sent you an image sound. ", $ M); // The Returned echo $ m;?>