Files
wizzardRedux/sites/Mapy.php

67 lines
1.3 KiB
PHP
Raw Normal View History

<?php
2016-02-26 00:50:18 -08:00
// Original code: The Wizard of DATz
2016-02-26 00:50:18 -08:00
print "<pre>";
2016-03-01 02:22:23 -08:00
$query = get_data("http://mapy.atari8.info/");
2016-02-26 00:50:18 -08:00
$query = explode('<td height="216" background="gfx/menumenu.gif" valign="top">', $query);
$query = explode("</td>", $query[1]);
$query = explode("href=\"", $query[0]);
$query[0] = null;
2016-02-26 00:50:18 -08:00
$total = 0;
$new = 0;
2016-02-26 00:50:18 -08:00
foreach ($query as $row)
{
if ($row)
{
2016-02-26 00:50:18 -08:00
$url = explode("\"", $row);
$url = $url[0];
if (!$r_query[$url])
{
2016-03-01 02:22:23 -08:00
$queryb = get_data("http://mapy.atari8.info/".$url);
2016-02-26 00:50:18 -08:00
$name = explode("<strong>:: ", $queryb);
$name = explode("</strong>", $name[1]);
$name = $name[0];
2016-02-26 00:50:18 -08:00
$author = explode('<a class="autor"', $queryb);
$author = explode(">", $author[1]);
$author = explode("<", $author[1]);
$author = trim($author[0]);
2016-02-26 00:50:18 -08:00
$dl = explode('href="stuff/', $queryb);
$dl = explode("\"", $dl[1]);
$dl = $dl[0];
2016-02-26 00:50:18 -08:00
$found[] = array($url, strtr($name." (".$author.")", $GLOBALS['normalize_chars']),$dl);
$new++;
}
2016-02-26 00:50:18 -08:00
$total++;
}
2016-02-26 00:50:18 -08:00
}
2016-02-26 00:50:18 -08:00
print "\nfound ".$total.", new ".$new."\n";
2016-02-26 00:50:18 -08:00
print "<table><tr><td><pre>";
foreach ($found as $row)
{
print "<a href=\"http://mapy.atari8.info/".$row[0]."\" target=_blank>".$row[0]."</a>\n";
}
print "</td><td><pre>";
foreach ($found as $row)
{
print "<a href=\"http://mapy.atari8.info/stuff/".$row[2]."\" target=_blank>".$row[1].".zip</a>\n";
}
2016-02-26 00:50:18 -08:00
print "</td></tr></table>";
?>