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?