GRAB THE USERS
$header[] = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36';
$c = curl_init('https://twitter.com/'.$user_to_scrape.'/followers/users?cursor='.$data_cursor_value.'&cursor_index=&cursor_offset=&include_available_features=1&include_entities=1&is_forward=true');
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_COOKIEJAR, $cookie_jar);
curl_setopt($c, CURLOPT_COOKIEFILE, $cookie_jar);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($c, CURLOPT_HTTPHEADER, $header);
curl_setopt($c, CURLOPT_CONNECTTIMEOUT , 60);
curl_setopt($c, CURLOP

IMEOUT, 60);
curl_setopt($c ,CURLOPT_ENCODING, "gzip");
$follow_ajax_responce = curl_exec($c);
SEND THE FOLLOW REQUEST
$url = 'https://twitter.com/i/user/follow';
$fields = array(
'authenticity_token' => urlencode($auth_value),
'challenges_passed' => urlencode('false'),
'handles_challenges' => urlencode('1'),
'impression_id' => urlencode(''),
'inject_tweet' => urlencode('false'),
'user_id' => urlencode($user_id),
);
//url-ify the data for the POST
$fields_string = '';
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');
//open connection
$c = curl_init();
$header = array();
$header[] = 'Origin:
https://twitter.com';
$header[] = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36';
$header[] = 'Content-Type: application/x-www-form-urlencoded';
$header[] = 'X-Requested-With: XMLHttpRequest';
$header[] = 'Referer: https://twitter.com/'.$user_name.'/followers';
//set the url, number of POST vars, POST data
curl_setopt($c, CURLOPT_URL, $url);
curl_setopt($c, CURLOPT_POST, count($fields));
curl_setopt($c, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_COOKIEJAR, $cookie_jar);
curl_setopt($c, CURLOPT_COOKIEFILE, $cookie_jar);
curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($c, CURLOPT_HTTPHEADER, $header);
curl_setopt($c, CURLOPT_CONNECTTIMEOUT ,60);
curl_setopt($c, CURLOP

IMEOUT, 60);
curl_setopt($c ,CURLOPT_ENCODING, "gzip");
$follow_ajax_responce = curl_exec($c);
//execute post
$result_of_follow = curl_exec($c);