Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="tumblr.php" method="POST">
- <textarea name="urls" rows="20" cols="20">
- </textarea>
- <input type="submit" name="send" value="Check" />
- </form>
- <?php
- $urls = $_POST['urls'];
- if(isset($urls)) {
- $test = explode(PHP_EOL, $urls);
- $num = count($test);
- $counter = 0;
- require("check.class.php");
- for($i = 0; $i < $num; $i++) {
- $obj[$i] = new Check($test[$i]);
- if($obj[$i]->check_url()) {
- $results[$counter]["url"] = $test[$i];
- $results[$counter]["status"] = $obj[$i]->check_status();
- if($results[$counter]["status"] == 1) {
- $results[$counter]["fb"] = $obj[$i]->get_fb();
- $results[$counter]["twitter"] = $obj[$i]->get_tweets();
- $results[$counter]["linkedin"] = $obj[$i]->get_linkedin();
- $results[$counter]["plusone"] = $obj[$i]->get_plusones();
- $results[$counter]["stumble"] = $obj[$i]->get_stumble();
- $results[$counter]["delicious"] = $obj[$i]->get_delicious();
- $results[$counter]["pinterest"] = $obj[$i]->get_pinterest();
- $results[$counter]["seo_rank"] = $obj[$i]->get_pagerank();
- }
- $counter++;
- } else {
- continue;
- }
- }
- echo "<table width='100%' border='0'>";
- echo "<tr style='text-align:center;'>";
- echo "<th>#</th>";
- echo "<th>URL</th>";
- echo "<th>Status</th>";
- echo "<th>Facebook</th>";
- echo "<th>Twitter</th>";
- echo "<th>LinkedIn</th>";
- echo "<th>Plusone</th>";
- echo "<th>Stumble</th>";
- echo "<th>Delicious</th>";
- echo "<th>Pinterest</th>";
- echo "<th>Page Rank</th>";
- echo "</tr>";
- for($i = 0; $i < $counter; $i++) {
- $tmp = $i + 1;
- echo "<tr style='text-align:center;'>";
- echo "<td>".$tmp."</td>";
- echo "<td>".$results[$i]["url"]."</td>";
- echo "<td>";
- if($results[$i]["status"] == 1)
- echo "<span style='color:green;'>Alive</span>";
- else
- echo "<span style='color:red;'>Dead</span>";
- echo "</td>";
- if($results[$i]["status"] == 1) {
- echo "<td>".$results[$i]["fb"]."</td>";
- echo "<td>".$results[$i]["twitter"]."</td>";
- echo "<td>".$results[$i]["linkedin"]."</td>";
- echo "<td>".$results[$i]["plusone"]."</td>";
- echo "<td>".$results[$i]["stumble"]."</td>";
- echo "<td>".$results[$i]["delicious"]."</td>";
- echo "<td>".$results[$i]["pinterest"]."</td>";
- echo "<td>".$results[$i]["seo_rank"]."</td>";
- } else {
- echo "<td colspan='8'>Social Shares & Page rank not availible on dead blog.</td>";
- }
- echo "</tr>";
- }
- echo "</table>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement