Files
wizzardRedux/sites/Symlink.php

63 lines
1.1 KiB
PHP
Raw Permalink Normal View History

<?php
2016-02-26 11:57:34 -08:00
// Original code: The Wizard of DATz
print "<pre>";
2016-02-26 11:57:34 -08:00
$pages = array(
"http://symlink.dk/nostalgia/dtv/fixed/?page=all",
"http://symlink.dk/nostalgia/dtv/humjoy/"
);
2016-02-26 11:57:34 -08:00
$old = 0;
$new = 0;
foreach ($pages as $page)
{
print "load ".$page."\n";
2016-03-01 17:19:18 -08:00
$content = get_data($page);
2016-02-26 11:57:34 -08:00
$content = explode('<tr><td><a href="?action=info&amp;id=', $content);
$content[0] = null;
2016-02-26 11:57:34 -08:00
foreach ($content as $row)
{
if ($row)
{
$id = explode('"', $row);
$id = $id[0];
2016-02-26 11:57:34 -08:00
$text = explode('>', $row);
2016-02-26 11:57:34 -08:00
$title = explode('<', $text[1]);
$title = $title[0];
2016-02-26 11:57:34 -08:00
$patched = explode('<', $text[4]);
$patched = $patched[0];
2016-02-26 11:57:34 -08:00
$version = explode('<', $text[6]);
$version = $version[0];
2016-02-26 11:57:34 -08:00
$title = $title." (patched by ".$patched.") (version ".$version.").zip";
2016-02-26 11:57:34 -08:00
if (!$r_query[$title])
{
$found[] = array($id, $title);
$new++;
2016-02-26 11:57:34 -08:00
}
else
{
$old++;
}
}
}
}
print "new ".$new.", old ".$old."\n";
2016-02-26 11:57:34 -08:00
foreach ($found as $row)
{
print "<a href=\"http://symlink.dk/nostalgia/dtv/fixed/?action=getdtv&id=".$row[0]."\" target=_blank>".$row[1]."</a>\n";
}
?>