Advertisement
deko96

Untitled

Apr 13th, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.39 KB | None | 0 0
  1. <form action="tumblr.php" method="POST">
  2. <textarea name="urls" rows="20" cols="20">
  3. </textarea>
  4. <input type="submit" name="send" value="Check" />
  5. </form>
  6. <?php
  7. $urls = $_POST['urls'];
  8. if(isset($urls)) {
  9.     $test = explode(PHP_EOL, $urls);
  10.     $num = count($test);
  11.     $counter = 0;
  12.     require("check.class.php");
  13.     for($i = 0; $i < $num; $i++) {
  14.         $obj[$i] =  new Check($test[$i]);
  15.         if($obj[$i]->check_url()) {
  16.             $results[$counter]["url"] = $test[$i];
  17.             $results[$counter]["status"] = $obj[$i]->check_status();
  18.             if($results[$counter]["status"] == 1) {
  19.                 $results[$counter]["fb"] = $obj[$i]->get_fb();
  20.                 $results[$counter]["twitter"] = $obj[$i]->get_tweets();
  21.                 $results[$counter]["linkedin"] = $obj[$i]->get_linkedin();
  22.                 $results[$counter]["plusone"] = $obj[$i]->get_plusones();
  23.                 $results[$counter]["stumble"] = $obj[$i]->get_stumble();
  24.                 $results[$counter]["delicious"] = $obj[$i]->get_delicious();
  25.                 $results[$counter]["pinterest"] = $obj[$i]->get_pinterest();
  26.                 $results[$counter]["seo_rank"] = $obj[$i]->get_pagerank();
  27.             }
  28.             $counter++;
  29.         } else {
  30.             continue;
  31.         }
  32.     }
  33.     echo "<table width='100%' border='0'>";
  34.     echo "<tr style='text-align:center;'>";
  35.     echo "<th>#</th>";
  36.     echo "<th>URL</th>";
  37.     echo "<th>Status</th>";
  38.     echo "<th>Facebook</th>";
  39.     echo "<th>Twitter</th>";
  40.     echo "<th>LinkedIn</th>";
  41.     echo "<th>Plusone</th>";
  42.     echo "<th>Stumble</th>";
  43.     echo "<th>Delicious</th>";
  44.     echo "<th>Pinterest</th>";
  45.     echo "<th>Page Rank</th>";
  46.     echo "</tr>";
  47.     for($i = 0; $i < $counter; $i++) {
  48.         $tmp = $i + 1;
  49.         echo "<tr style='text-align:center;'>";
  50.         echo "<td>".$tmp."</td>";
  51.         echo "<td>".$results[$i]["url"]."</td>";
  52.         echo "<td>";
  53.         if($results[$i]["status"] == 1)
  54.             echo "<span style='color:green;'>Alive</span>";
  55.         else
  56.             echo "<span style='color:red;'>Dead</span>";
  57.         echo "</td>";
  58.         if($results[$i]["status"] == 1) {
  59.             echo "<td>".$results[$i]["fb"]."</td>";
  60.             echo "<td>".$results[$i]["twitter"]."</td>";
  61.             echo "<td>".$results[$i]["linkedin"]."</td>";
  62.             echo "<td>".$results[$i]["plusone"]."</td>";
  63.             echo "<td>".$results[$i]["stumble"]."</td>";
  64.             echo "<td>".$results[$i]["delicious"]."</td>";
  65.             echo "<td>".$results[$i]["pinterest"]."</td>";
  66.             echo "<td>".$results[$i]["seo_rank"]."</td>";
  67.         } else {
  68.             echo "<td colspan='8'>Social Shares & Page rank not availible on dead blog.</td>";
  69.         }
  70.         echo "</tr>";
  71.     }
  72.     echo "</table>";
  73. }
  74.  
  75.  
  76. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement