#StackBounty: #web-scraping #extract scraping data from truecaller

Bounty: 50

I have 200K phone number and i want to get there city using truecaller , how to do that ?
as you know truecaller has a restriction per requests ,,

somebody do this here :
https://www.phphive.info/324/truecaller-api/

this is mycode :

 $cookieFile = dirname(__file__) . DIRECTORY_SEPARATOR . 'cookies';
    $no = $users[0];
    $url = "https://www.truecaller.com/api/search?type=4&countryCode=sd&q=" . $no;
    $ch = curl_init();
    $header = array();
    $header[] = 'Content-length: 0';
    $header[] = 'Content-type: application/json';
    $header[] = 'Authorization: Bearer i03~CNORR-VIOJ2k~Hua_GBt73sKJJmO';
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $data = curl_exec($ch);
    $error = curl_error($ch);
    curl_close($ch);
    $data = json_decode($data, true);
    $name = $data['data'][0]['name'];
    $altname = $data['data'][0]['altName'];
    $gender = $data['data'][0]['gender'];
    $about = $data['data'][0]['about'];


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.