PHPcode & lt ;? Php $ usernamebase64_encode (& quot; [email & #160; protected] & quot;); $ datafile_get_contents (login.sina.com. cnssoprelogin. php? Entryminiblog & CURL
PHP code
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" => "UTF-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.
------ Solution --------------------
Http://www.jb51.net/article/29486.htm look at this