Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function curl($url, $post=null){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- if($post!=null){
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
- }
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_HEADER, true);
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
- curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
- //curl_setopt($ch, CURLOPT_VERBOSE, true);
- $exec = curl_exec($ch);
- return $exec;
- curl_close($ch);
- }
- include 'koneksi.php';
- $result = mysql_query("SELECT * FROM auto");
- if($result){
- while($row = mysql_fetch_array($result))
- {
- $ide = $row[id];
- $access_token = $row[accesstoken];
- $id = $row[grup];
- $text = $row[kalimat];
- $user = $row[idmu];
- $pass = $row[pwmu];
- $data = "email=".$user."&pass=".$pass."&login=Masuk";
- $asu = curl("https://m.facebook.com/login.php", $data);
- $asu = curl("https://www.facebook.com/dialog/oauth?response_type=token&display=popup&client_id=145634995501895&redirect_uri=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fexplorer%2Fcallback&scope=user_actions.books%2Cuser_actions.music%2Cuser_actions.video%2Cuser_checkins%2Cuser_education_history%2Cuser_events%2Cuser_games_activity%2Cuser_groups%2Cuser_hometown%2Cuser_interests%2Cuser_likes%2Cuser_location%2Cuser_notes%2Cuser_photo_video_tags%2Cuser_photos%2Cuser_questions%2Cuser_relationship_details%2Cuser_relationships%2Cuser_religion_politics%2Cuser_status%2Cuser_subscriptions%2Cuser_videos%2Cuser_website%2Cuser_work_history%2Cfriends_about_me%2Cfriends_actions.books%2Cfriends_actions.music%2Cfriends_actions.news%2Cfriends_actions.video%2Cfriends_activities%2Cfriends_birthday%2Cfriends_checkins%2Cfriends_education_history%2Cfriends_events%2Cfriends_games_activity%2Cfriends_groups%2Cfriends_hometown%2Cfriends_interests%2Cfriends_likes%2Cfriends_location%2Cfriends_notes%2Cfriends_photo_video_tags%2Cfriends_photos%2Cfriends_questions%2Cfriends_relationship_details%2Cfriends_relationships%2Cfriends_religion_politics%2Cfriends_status%2Cfriends_subscriptions%2Cfriends_videos%2Cfriends_website%2Cfriends_work_history%2Cads_read%2Cemail%2Cpublish_checkins");
- if(file_exists("cookie.txt"))unlink("cookie.txt");
- $gay = preg_match("/access_token=(.*?)&expires_in/i", $asu, $m);
- $query = "UPDATE auto SET accesstoken = '$m[1]' WHERE id = '$ide'";
- $hasil = mysql_query($query);
- //see the result
- if ($hasil) {
- echo "<h4> update data success</h4>";
- }
- echo $m[1];
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement