Ex-centro |
03-14-2011 02:15 AM |
Quick and Dirty PHP script for linksex overviiew
Morning!
here is a smal php scriot to include your linkex links in your own statspage.
PHP Code:
<?php
$dir = "/your/home/www/linkex/data/links";
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if(is_numeric($file)) {
$t = unserialize(file_get_contents("$dir/$file"));
$links[$file] = array($t);
}
}
closedir($dh);
}
}
krsort($links);
echo "<table border=1>\n".
"<tr><td>ID</td><td>Inbound</td><td>Outbound</td><td>Anker</td><td>e-mail</td><td>Add date</td><td>last Check</td></tr>\n";
foreach ($links as $l){
echo "<tr><td>{$l[0]["id"]}</td><td>{$l[0]["rdom"]}</td><td>{$l[0]["lurl"]}</td><td>{$l[0]["anchor"]}</td><td>{$l[0]["email"]}</td><td>".date("d.m.y",$l[0]["added"])."</td><td>".date("d.m.y",$l[0]["lastchecked"])."</td></tr>\n";
}
echo "</table>";
?>
just set $dir to your linkexplace and go.
|