CURL simulated login to SINA Weibo

Source: Internet
Author: User
CURL simulated login to SINA Weibo
 Servertime. $ json-> nonce); $ CookieFile = '/sinacookie /'. $ username. '_ sinacookie. tmp '; $ post_data = array ("entry" => "weibo", "gateway" => "1", "from" => "", "savestate" => "7", "useticket" => "1", "ssosimplelogin" => "1", "username" => $ username, // username after base 64 "service" => "miniblog", "servertime" => $ json-> servertime, // the server time obtained in the previous step "nonce" => $ json-> nonce, // the randomly generated string "pwencode" => "wsse" obtained in the previous step ", "password" => $ pw, // encrypted password "encoding" => "u Tf-8 "," url "=>" + HttpUtility. UrlEncode ('http: '// 'Weibo. com/ajaxlogin. php? Framelogin = 1 & callback = parent. sinaSSOController. feedBackUrlCallBack ') "," returntype "=>" META "); $ ch = curl_init (); curl_setopt ($ ch, CURLOPT_URL," http://login.sina.com.cn/sso/login.php? Client = ssologin. js (v1.3.16) "); curl_setopt ($ ch, CURLOPT_POST, true); curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ post_data); curl_setopt ($ ch, CURLOPT_COOKIEJAR, $ CookieFile ); curl_setopt ($ ch, CURLOPT_COOKIEFILE, $ CookieFile); curl_exec ($ ch); curl_close ($ ch);?>



Why can't I log on ??? The user name and password are correct, and no error is prompted.


Reply to discussion (solution)

Isn't sina a ready-made api that can be called?

The simulation of Sina from day to night can be simulated by Sina.

Http://www.jb51.net/article/29486.htm look at this

The second floor is not suitable for technology.

? Primary solution? ?? I also want to do Sina's model? Login ?~ Generation ?.

No, I can log on to the Sina page.
5. use PHP's Curl extension to compile a program and call friends_timeline, update, and upload interfaces of the Weibo open API to obtain the corresponding results.
My sister-in-law is missing.

Is it solved on the 6th floor?

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.