Files
wizzardRedux/sites/PokemonMiniNet.php

67 lines
964 B
PHP
Raw Permalink Normal View History

<?php
2016-02-26 09:53:04 -08:00
// Original code: The Wizard of DATz
$dirs = array(
'http://www.pokemon-mini.net/downloads/',
);
2016-02-26 09:53:04 -08:00
print "<pre>check folders:\n\n";
foreach ($dirs as $dir)
{
print "load: ".$dir."\n";
2016-03-01 14:28:47 -08:00
$query = get_data($dir);
2016-02-26 09:53:04 -08:00
$query = explode('<div class="wpfilebase-fileicon"><a href="', $query);
$query[0] = null;
2016-02-26 09:53:04 -08:00
$new = 0;
$old = 0;
2016-02-26 09:53:04 -08:00
foreach ($query as $row)
{
if ($row)
{
$url = explode('"', $row);
$title = $url[2];
$url = $url[0];
2016-02-26 09:53:04 -08:00
$ext = explode('.', $url);
$ext = $ext[count($ext) - 1];
2016-02-26 09:53:04 -08:00
if (!$r_query[$url])
{
2016-02-26 09:53:04 -08:00
$found[] = array($title.'.'.$ext, $url);
$new++;
}
else
{
$old++;
}
}
}
print "close: ".$dir."\n";
print "new: ".$new.", old: ".$old."\n";
}
2016-03-01 14:28:47 -08:00
print "\nnew urls:\n\n";
print "<table><tr><td><pre>";
foreach ($found as $url)
{
print "<a href=\"".$url[1]."\">".$url[0]."</a>\n";
}
print "</td><td><pre>";
foreach ($found as $url)
{
print $url[1]."\n";
}
print "</td></tr></table>";
?>