Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $content = file_get_contents(__DIR__.'/accounts');
- $accounts = explode("\n", $content);
- $accounts = array_filter(array_unique($accounts));
- if(empty($accounts)){
- echo("Add accounts to file 'accounts', each in a new line.\n");
- }
- foreach($accounts as $account){
- if(check($account)){
- echo "$account - OK!\n";
- }else{
- echo "$account - ERR!\n";
- }
- //sleep(1); // in seconds
- }
- function check($username){
- $url = "https://www.instagram.com/{$username}/";
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- //curl_setopt($ch, CURLOPT_HEADER, true);
- //curl_setopt($ch, CURLOPT_NOBODY, true);
- curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36');
- $c = curl_exec($ch);
- //print_r(curl_getinfo($ch));
- //print_r($c);
- if(curl_getinfo($ch, CURLINFO_HTTP_CODE) === 404){
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement