Microsoft small ice non Api ice chat interface PHP-PHP source code

Source: Internet
Author: User
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;?>

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.