Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('fungsi.php');
- $username = "";
- $password = "";
- $ua = generate_useragent();
- $devid = generate_device_id();
- $login = proccess(1, $ua, 'accounts/login/', 0, hook('{"device_id":"'.$devid.'","guid":"'.generate_guid().'","username":"'.$username.'","password":"'.$password.'","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}'));
- $data = json_decode($login[1]);
- preg_match_all('%Set-Cookie: (.*?);%',$login[0],$d);$cookie = '';
- for($o=0;$o<count($d[0]);$o++)$cookie.=$d[1][$o].";";
- if(preg_match("/sessionid/", $cookie)){
- $apinya = curl('https://www.instagram.com/'.$username.'/?__a=1'); $hpr = json_decode($apinya, 1);
- $user_id = $hpr['user']['id'];
- print 'ADA SESI<br><br>';
- print 'User id : '.$user_id.'<br>';
- print 'Useragent : '.$ua.'<br>';
- print 'Cookie : '.$cookie.'<br>';
- //MASUKKIN METODE INSET DB DISINI
- }else{
- print 'GA ADA SESI<br>';
- }
- function curl($dhan, $cha=null) {
- $love = curl_init();
- curl_setopt($love, CURLOPT_URL, $dhan);
- if($cha != null){
- curl_setopt($love, CURLOPT_POST, true);
- curl_setopt($love, CURLOPT_POSTFIELDS, $cha);
- }
- curl_setopt($love, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($love, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($love, CURLOPT_SSL_VERIFYPEER, false);
- $hmm = curl_exec($love);
- curl_close($love);
- return $hmm;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement