$ Rconfig = pdo_fetch ("SELECT * FROM ". tablename ("eduTwo_renren "). "WHERE weid =: weid", array (': weid' = >$ _ W ['weid']); $ Cookie_file = dirname (_ FILE _). "/renren. cookie "; $ Login_url = 'http: // passport.renren.com/plogin.do '; $ Post_fields ['email '] = $ rconfig ['rusername']; $ Post_fields ['password'] = $ rconfig ['rpassword']; $ Post_fields ['url url'] = 'http % 3A % 2F % 2Fhome.renren.com % 2FHome. do '; $ Post_fields ['domain '] = 'renren. Com '; $ Ch = curl_init ($ login_url ); Curl_setopt ($ ch, CURLOPT_USERAGENT, 'mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv: 1.9.1.5) Gecko/20091102 Firefox/3.5.5 '); Curl_setopt ($ ch, CURLOPT_HEADER, 0 ); Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 ); Curl_setopt ($ ch, CURLOPT_MAXREDIRS, 1 ); Curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, 1 ); Curl_setopt ($ ch, CURLOPT_AUTOREFERER, 1 ); Curl_setopt ($ ch, CURLOPT_POST, 1 ); Curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ post_fields ); Curl_setopt ($ ch, CURLOPT_COOKIEJAR, $ cookie_file ); $ Content = curl_exec ($ ch ); $ Info = curl_getinfo ($ ch ); Curl_close ($ ch ); // Var_dump ($ info); exit; // Match the user ID $ Send_url = 'http: // www.renren.com/home '; $ Ch = curl_init ($ send_url ); Curl_setopt ($ ch, CURLOPT_HEADER, 0 ); Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 ); Curl_setopt ($ ch, CURLOPT_COOKIEFILE, $ cookie_file ); Curl_exec ($ ch ); $ Info = curl_getinfo ($ ch ); Curl_close ($ ch ); // $ Uid = "305115027 "; // Obtain the token and mnsx. $ Send_url = $ info ['redirect _ url']; $ Ch = curl_init ($ send_url ); Curl_setopt ($ ch, CURLOPT_HEADER, 0 ); Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 ); Curl_setopt ($ ch, CURLOPT_COOKIEFILE, $ cookie_file ); $ Tmp = curl_exec ($ ch ); Curl_close ($ ch ); Preg_match_all ("/get_check :'(.*?) ', Get_check_x :'(.*?) ',/Is ", $ tmp, $ arr ); Preg_match_all ("/'ruid ':'(.*?) ',/Is ", $ tmp, $ utmp ); // Var_dump ($ utmp); exit; $ Token = $ arr [1] [0]; // 1121558104 $ Scn = $ arr [2] [0]; // e9a9cb2 $ Uid = $ utmp [1] [0]; // Echo $ token; exit; // Publish information $ Poststr ['content'] =_ _ GPC ['content']. $ rconfig ['tail']; $ Poststr ['withinfo'] = '{"wpath": []}'; $ Poststr ['hostid: '] = $ uid; $ Poststr ['privacyparams'] = '{"sourceControl": 99 }'; $ Poststr ['requesttoken'] = $ token; $ Poststr ['_ mns'] = $ mns; $ Poststr ['channel'] = "renren "; $ Head = array ( 'Referer: http://shell.renren.com/ajaxproxy.htm ', 'X-Requested-With: XMLHttpRequest ', ); $ Ch = curl_init ("http://shell.renren.com/?#uid=/status "); Curl_setopt ($ ch, CURLOPT_USERAGENT, 'mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv: 1.9.1.5) Gecko/20091102 Firefox/3.5.5 '); Curl_setopt ($ ch, CURLOPT_HTTPHEADER, $ head ); Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 ); Curl_setopt ($ ch, CURLOPT_MAXREDIRS, 1 ); Curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, 1 ); Curl_setopt ($ ch, CURLOPT_AUTOREFERER, 1 ); Curl_setopt ($ ch, CURLOPT_POST, 1 ); Curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ poststr ); Curl_setopt ($ ch, CURLOPT_COOKIEFILE, $ cookie_file ); $ Content = curl_exec ($ ch ); Curl_close ($ ch ); // Echo $ content; exit; $ Data = json_decode ($ content, true ); If ($ data ["code"] = "0 "){ Echo "released successfully! "; } Else { Echo "shit !!! "; } |