ToKeiChun

Bulk SEO Checker [php-cli]

Jan 11th, 2020
982
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. function getMoz($domain){
  4. $curl = curl_init();
  5. curl_setopt($curl, CURLOPT_URL, "http://www.scrolltotop.com/MozRank-Domain-Authority-Checker.php");
  6. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  7. curl_setopt($curl, CURLOPT_HEADER, false);
  8. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  9. curl_setopt($curl, CURLOPT_POSTFIELDS, "url_form=$domain");
  10. $exec = curl_exec($curl);
  11. curl_close($curl);
  12. preg_match_all('/<\/td><td>(.*?)<\/td><td>(.*?)<\/td><td>(.*?)<\/td><td>(.*?)<\/td><td>(.*?)<\/td><\/tr>/', $exec, $mpd);
  13. return "Moz Rank : ".$mpd[4][0]."\nPage Authority : ".$mpd[3][0]."\nDomain Authority : ".$mpd[2][0]."\nBacklinks : ".$mpd[5][0]."\n";
  14. }
  15. function getAlexa($domain){
  16. $curl = curl_init();
  17. curl_setopt($curl, CURLOPT_URL, "http://data.alexa.com/data?cli=10&dat=snbamz&url=$domain");
  18. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  19. curl_setopt($curl, CURLOPT_HEADER, false);
  20. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  21. $exec = curl_exec($curl);
  22. curl_close($curl);
  23. $alex1 = '<POPULARITY URL="(.*?)" TEXT="(.*?)"';
  24. $alex2 = 'NAME="(.*?)" RANK="(.*?)"\/>';
  25. preg_match_all("/$alex1/", $exec, $rank);
  26. preg_match_all("/$alex2/", $exec, $country);
  27. $getAlexx = "Global Rank : ".$rank[2][0]."\nLocal Rank : ".$country[2][0]."\nCountry : ".$country[1][0]."\n";
  28. $getKosong = "Global Rank -: \nLocal Rank : -\nCountry : -\nCountry Code : -\n";
  29. if(preg_match("/<POPULARITY/i", $exec)){
  30. return $getAlexx;
  31. }else{
  32. return $getKosong;
  33. }
  34. }
  35. function trafficCheck($domain){
  36. $curl = curl_init();
  37. curl_setopt($curl, CURLOPT_URL, "http://www.statshow.com/www/$domain");
  38. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  39. curl_setopt($curl, CURLOPT_HEADER, false);
  40. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  41. $exec = curl_exec($curl);
  42. curl_close($curl);
  43. preg_match_all('/<div id=\"box_1\" class=\"box_on\">(.*?)<span class=\"red_bold\">(.*?)<\/span><br \/>(.*?)<span class=\"red_bold\">(.*?)<\/span>/', $exec, $daily);
  44. preg_match_all('/<div id=\"box_2\" class=\"box_off\">(.*?)<span class=\"red_bold\">(.*?)<\/span><br \/>(.*?)<span class=\"red_bold\">(.*?)<\/span>/', $exec, $monthly);
  45. preg_match_all('/<div id=\"box_3\" class=\"box_off\">(.*?)<span class=\"red_bold\">(.*?)<\/span><br \/>(.*?)<span class=\"red_bold\">(.*?)<\/span>/', $exec, $yearly);
  46. return "Daily Page Views : ".$daily[2][0]."\nDaily Visitors : ".$daily[4][0]."\nMonthly Page Views : ".$monthly[2][0]."\nMonthly Visitors : ".$monthly[4][0]."\nYearly Page Views : ".$yearly[2][0]."\nYearly Visitors : ".$yearly[4][0]."\n";
  47. }
  48. $banner = "
  49. Powered By VanGans
  50. $$$$$$\ $$$$$$$$\ $$$$$$\
  51. $$ __$$\ $$ _____|$$ __$$\
  52. $$ / \__|$$ | $$ / $$ |
  53. \$$$$$$\ $$$$$\ $$ | $$ |
  54. \____$$\ $$ __| $$ | $$ |
  55. $$\ $$ |$$ | $$ | $$ |
  56. \$$$$$$ |$$$$$$$$\ $$$$$$ |
  57. \______/ \________| \______/\n";
  58. echo $banner."\n";
  59. echo "DOMAIN LIST: ";
  60. $url = trim(fgets(STDIN));
  61. $kontorus = file_get_contents($url);
  62. $urls = explode("\n", $kontorus);
  63. echo "+================================+\n";
  64. echo " MASS SEO TOOLS \n";
  65. echo "+================================+\n";
  66. foreach ($urls as $domain) {
  67. echo "Domain : ".$domain."\n";
  68. echo getAlexa($domain);
  69. echo getMoz($domain);
  70. echo trafficCheck($domain);
  71. echo "+================================+\n";
  72. $ale = getAlexa($domain);
  73. $moz = getMoz($domain);
  74. $tra = trafficCheck($domain);
  75. $result = ("$domain$ale$moz$tra");
  76. $save = @fopen("seo_result.txt", "a");
  77. fwrite($save, $result."\n");
  78. fclose($save);
  79. }
Add Comment
Please, Sign In to add comment