Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $user_name = "KULLANICIADIM";
- $pass = "ŞİFREM";
- $c = curl_init();
- curl_setopt($c, CURLOPT_URL, 'https://instagram.com/accounts/login/?force_classic_login');
- curl_setopt($c, CURLOPT_REFERER, 'https://instagram.com/accounts/login/?force_classic_login');
- curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($c, CURLOPT_COOKIEFILE, 'cookie.txt');
- curl_setopt($c, CURLOPT_COOKIEJAR, 'cookie.txt'); // cookie txt var mı izinded
- $page = curl_exec($c);
- preg_match_all('/<input type="hidden" name="csrfmiddlewaretoken" value="([A-z0-9]{32})"\/>/', $page, $token);
- curl_setopt($c, CURLOPT_URL, 'https://instagram.com/accounts/login/?force_classic_login');
- curl_setopt($c, CURLOPT_REFERER, 'https://instagram.com/accounts/login/?force_classic_login');
- curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($c, CURLOPT_POST, true);
- curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($c, CURLOPT_POSTFIELDS, "csrfmiddlewaretoken=".$token[1][0]."&username=" . $user_name . "&password=". $pass);
- $page = curl_exec($c);
- curl_close($c);
- $page = str_replace("<head>","<head>".PHP_EOL."<base href='https://www.instagram.com/'>",$page);
- echo $page;
- curl_setopt($c, CURLOPT_URL, 'https://instagram.com/yavuzwasheree/');
- curl_setopt($c, CURLOPT_REFERER, 'https://instagram.com/');
- curl_setopt($c, CURLOPT_HTTPHEADER, array(
- 'Accept-Language: en-US,en;q=0.8',
- 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36',
- 'Accept: */*',
- 'X-Requested-With: XMLHttpRequest',
- 'Connection: keep-alive'
- ));
- curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
- $page = curl_exec($c);
- curl_close($c);
- $page = str_replace("<head>","<head>".PHP_EOL."<base href='https://www.instagram.com/'>",$page);
- echo $page;
- //header("Location : http://www.instagram.com");
- // script bu bi deneme yapalım
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement