', $query);
$title = explode('', $title[1]);
$title = $title[0];
if ($title != ' Ooops, something wrent wrong!!')
{
$info = array();
$last = '';
foreach ($searchs as $search)
{
$temp = explode($search.'', $query);
$temp = explode('', $temp[1]);
$temp = trim(strip_tags($temp[0]));
$temp = str_replace(array('(', ')', '[', ']', '?', ', Unknown', ' / '), array('', '', '', '', 'x', '', ', '), $temp);
if ($temp && $temp != 'Unknown' && $temp != 'None' && $last != $temp)
{
$info[] = $temp;
}
$last = $temp;
}
print $side_id."\t".$title." (".implode(") (", $info).")\n";
}
}
}
elseif($_GET["sub"] == 'ids')
{
$r_query = array_flip($r_query);
$start = $r_query[-1];
print "Search for new uploads\n";
$searchs = array(
'Published:',
'Musician:',
'Programmer:',
'Language:',
'Cracker/Cruncher:',
'Extra Features:',
'PAL/NTSC:',
);
for ($x = $start; $x < $start + 50; $x++)
{
$query = get_data("http://www.gamebase64.com/game.php?id=".$x);
$title = explode('', $query);
$title = explode('', $title[1]);
$title = $title[0];
if ($title != ' Ooops, something wrent wrong!!')
{
$info = array();
$last = '';
foreach ($searchs as $search)
{
$temp = explode($search.'', $query);
$temp = explode('', $temp[1]);
$temp = trim(strip_tags($temp[0]));
$temp = str_replace(array('(', ')', '[', ']', '?', ', Unknown', ' / '), array('', '', '', '', 'x', '', ', '), $temp);
if ($temp && $temp != 'Unknown' && $temp != 'None' && $last != $temp)
{
$info[] = $temp;
}
$last = $temp;
}
$url = explode('GB64-Filename: ', $query);
$url = explode('', $url[1]);
$url = $url[0];
if ($url != 'None')
{
$found[] = array($url, $title." (".implode(") (", $info).").zip");
}
$last = $x;
}
else
{
print $x."\tOoops, something wrent wrong!!\n";
}
}
if ($last)
{
$start=$last+1;
}
print "";
foreach ($found as $row)
{
print $row[0]."\n";
}
print " | ";
foreach ($found as $row)
{
print "".$row[1]."\n";
}
print " | ";
print "\nnext startnr\t".$start."\n";
}
elseif ($_GET["sub"] == 'dir')
{
$r_query = implode('', file("../sites/".$source."_urls.txt"));
$r_query = explode("\r\n", "\r\n".$r_query);
$dirs = array();
$files = array();
foreach ($r_query as $row)
{
$dir = explode("/", $row);
if ($dir[1])
{
$dirs[$dir[0]] = $dir[0];
$files[$dir[1]] = true;
}
}
$main="http://gamebase64.hardabasht.com/games/";
print "\nload:".$main."\n";
sort($dirs);
$searchs = array(
'Published:',
'Musician:',
'Programmer:',
'Language:',
'Cracker/Cruncher:',
'Extra Features:',
'PAL/NTSC:',
);
foreach ($dirs as $row)
{
$new = 0;
$old = 0;
print "load:".$main.$row."\n";
$query2 = get_data($main.$row);
$query2 = explode('', $query);
$title = explode('', $title[1]);
$title = $title[0];
$info = array();
$last = '';
foreach ($searchs as $search)
{
$temp = explode($search.'', $query);
$temp = explode('', $temp[1]);
$temp = trim(strip_tags($temp[0]));
$temp = str_replace(array('(', ')', '[', ']', '?', ', Unknown', ' / '), array('', '', '', '', 'x', '', ', '), $temp);
if ($temp && $temp != 'Unknown' && $temp != 'None' && $last != $temp)
{
$info[] = $temp;
}
$last = $temp;
}
$found[] = array($row."/".$url, $title." (".implode(") (", $info).").zip");
$new++;
}
else
{
$old++;
}
}
}
print "found new ".$new.", old ".$old."\n";
}
print "";
foreach ($found as $row)
{
print "".$row[0]."\n";
}
print " | ";
foreach ($found as $row)
{
print "".$row[1]."\n";
}
print " | ";
}
else
{
print "ids\n".
"dir\n".
"list (to get the title by IDs)\n";
}
?> | |
|