Files
wizzardRedux/sites/tomcat.php

161 lines
2.8 KiB
PHP
Raw Permalink Normal View History

<?php
2016-02-26 11:57:34 -08:00
// Original code: The Wizard of DATz
2016-02-26 11:57:34 -08:00
print "<pre>";
2016-02-26 11:57:34 -08:00
$newfiles = array(
'http://retrospec.sgn.net/users/tomcat/yu/ZX_list.php',
'http://retrospec.sgn.net/users/tomcat/yu/C64_list.php',
'http://retrospec.sgn.net/users/tomcat/yu/Amiga_list.php',
'http://retrospec.sgn.net/users/tomcat/yu/CPC_list.php',
'http://retrospec.sgn.net/users/tomcat/yu/Plus4_list.php',
'http://retrospec.sgn.net/users/tomcat/yu/ST_list.php',
'http://retrospec.sgn.net/users/tomcat/yu/Galaksija_list.php',
'http://retrospec.sgn.net/users/tomcat/yu/Orao_list.php',
'http://retrospec.sgn.net/users/tomcat/yu/Pecom_list.php',
);
2016-02-26 11:57:34 -08:00
foreach ($newfiles as $newfile)
{
print "load ".$newfile."\n";
2016-03-01 17:19:18 -08:00
$query = get_data($newfile);
2016-02-26 11:57:34 -08:00
$query = explode('<tr onmouseover', $query);
$query[0] = null;
$old = 0;
$new = 0;
foreach ($query as $row)
{
if ($row)
{
$row = explode('</tr>', $row);
$row = explode('<td', $row[0]);
$title = trim(strip_tags('<td'.$row[2]));
if ($title)
{
$lastTitle = $title;
}
else
{
$title = $lastTitle;
}
2016-02-26 11:57:34 -08:00
$info = trim(strip_tags('<td'.$row[3]));
2016-02-26 11:57:34 -08:00
$url = explode('<a href="', $row[5]);
$url = explode('"', $url[1]);
2016-02-26 11:57:34 -08:00
if ($url[0])
{
$url = $url[0];
2016-02-26 11:57:34 -08:00
$ext = explode('.', $url);
$ext = $ext[count($ext) - 1];
2016-02-26 11:57:34 -08:00
$title = $title." (".$info.").".$ext;
2016-02-26 11:57:34 -08:00
if ($r_query[$url])
{
$old++;
2016-02-26 11:57:34 -08:00
}
else
{
$found[] = array($url, $title);
$new++;
}
}
}
}
print "found new:".$new.", old:".$old."\n\n";
}
2016-02-26 11:57:34 -08:00
$newfiles = array(
'http://retrospec.sgn.net/users/tomcat/yu/TRDosReCracks.php',
);
2016-02-26 11:57:34 -08:00
foreach ($newfiles as $newfile)
{
print "load ".$newfile."\n";
2016-03-01 17:19:18 -08:00
$query = get_data($newfile);
2016-02-26 11:57:34 -08:00
$query = explode('<TR>', $query);
$query[0] = null;
$old = 0;
$new = 0;
foreach($query as $row)
{
if ($row)
{
$row = explode('<td', $row);
$title = trim(strip_tags('<td'.$row[2]));
if ($title)
{
$lastTitle = $title;
}
else
{
$title = $lastTitle;
}
2016-02-26 11:57:34 -08:00
$info = array();
2016-02-26 11:57:34 -08:00
for ($x = 5; $x <= 8; $x++)
{
2016-02-26 11:57:34 -08:00
$temp = trim(strip_tags('<td'.$row[$x]));
if ($temp)
{
$info[] = $temp;
}
}
2016-02-26 11:57:34 -08:00
$url = explode('<a href="', $row[4]);
$url = explode('"', $url[1]);
2016-02-26 11:57:34 -08:00
if ($url[0])
{
$url = $url[0];
2016-02-26 11:57:34 -08:00
$ext = explode('.', $url);
$ext = $ext[count($ext) - 1];
2016-02-26 11:57:34 -08:00
$title = $title." (".implode(') (', $info).").".$ext;
2016-02-26 11:57:34 -08:00
if ($r_query[$url])
{
$old++;
2016-02-26 11:57:34 -08:00
}
else
{
$found[] = array($url, $title);
$new++;
}
}
}
}
print "found new:".$new.", old:".$old."\n\n";
}
print "<table><tr><td><pre>";
2016-02-26 11:57:34 -08:00
foreach ($found as $row)
{
print $row[0]."\n";
}
print "</td><td><pre>";
2016-02-26 11:57:34 -08:00
foreach ($found as $row)
{
print "<a href=\"http://retrospec.sgn.net/users/tomcat/yu/".$row[0]."\">".$row[1]."</a>\n";
}
print "</td></tr></table>";
?>