Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $list = "/path.txt";
- $urlParts = file_get_contents($list);
- $urlParts = parse_url($hmms);
- // remove www
- $domain = preg_replace('/^www\./', '', $urlParts['host']);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, "https://www.alexa.com/siteinfo/$domain");
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_HEADER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- $exec = curl_exec($curl);
- curl_close($curl);
- preg_match_all("/<a href='(.*?)' title='(.*?)'>(.*?)<\/a>/", $exec, $hasil);
- preg_match_all('/<strong class="(.*?)">\n(.*?)<\/strong>/', $exec, $hasil2);
- preg_match_all('/<strong class="(.* ?)">\n(.* ?)>\n(.*?)<\/strong>/', $exec, $hasil3);
- print "Domain : $domain \n";
- print "Country : ".$hasil[3][0]."\n";
- print "Local Rank :\033[1;31m ".$hasil2[2][0]."\033[0m \n";
- print "Global Rank : \033[1;33m".$hasil3[3][0]."\033[0m \n";
- print "+--------------------------------+\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement