Nearing the end of round 1

This commit is contained in:
Matt Nadareski
2016-02-26 12:48:32 -08:00
parent 2b4277d0a1
commit 2df2fc0e49
8 changed files with 1097 additions and 1046 deletions

View File

@@ -6,8 +6,7 @@ Check for new downloadable ROMs from all available sites
Requires:
source The sourcename to check against (in sites/<source>.php)
TODO: Retool existing onlinecheck.php files to follow the new format
2 passes: 1) reformat file and categorize, 2) check code flow to try to optimize
TODO: Retool existing onlinecheck.php files to follow the new format. 2 passes: 1) reformat file and categorize, 2) check code flow to try to optimize
TODO: Add a way to figure out if a site is dead based on the original list that WoD created
TODO: Most explode/implode can probably be changed to preg_match, just need to decipher them
TODO: For page read, can we use the function in parsenointro (the cURL one)?
@@ -20,6 +19,8 @@ TODO: Remove external and import only
TODO: Merge MESS and MAME in sources
TODO: Some loadDir functions are useless because they are only used once. Put their code where it should be
TODO: Maybe look at NES-CartDatabase for No-Intro parsing
TODO: VideopacNL uses a cookie to be able to access the board. This means you need to log in to the site and then copy the cookie as a param
TODO: VimmsLair uses wget.exe currently. Can this be reamped to use cURL instead (since it's built into PHP)?
*/
// Site whose checkers have been once-overed (not all checked for dead)
@@ -132,6 +133,13 @@ $checked = array (
"tosec", // Import only
"TRS80CoCoArchive",
"trurip", // Import only
"TZXvault",
"UltimateC64TP",
"UnofficialCD32Ports",
"vgdb",
"vic20it",
"VideopacNL",
"VimmsLair",
);
if (!isset($_GET["source"]))

View File

@@ -1,9 +1,8 @@
<?php
print "<pre>";
$r_query=implode ('', file ($_GET["source"]."/ids.txt"));
$r_query=explode ("\r\n","\r\n".$r_query);
$r_query=array_flip($r_query);
// Original code: The Wizard of DATz
print "<pre>";
$mainPages=Array(
"http://www.tzxvault.org/index.htm",
@@ -13,110 +12,134 @@ $mainPages=Array(
"http://www.tzxvault.org/Vic20/index.htm",
);
$pages=Array();
$pages = array();
foreach ($mainPages as $page)
{
print "load ".$page."\n";
$content=implode ('', file ($page));
$content=explode ('href="',$content);
array_splice ($content,0,1);
$content = implode('', file($page));
$content = explode('href="', $content);
array_splice($content, 0, 1);
foreach ($content as $row){
$row=explode('"',$row);
$row=$row[0];
foreach ($content as $row)
{
$row = explode('"', $row);
$row = $row[0];
print "found ".$row."\n";
$pages[$row]=$row;
$pages[$row] = $row;
}
}
$URLs=Array();
foreach ($pages as $page)
{
print "load ".$page."\n";
$dirs=Array();
$dirs = array();
$new=0;
$old=0;
$new = 0;
$old = 0;
$content=implode ('', file ($page));
$content=str_replace('&nbsp;',' ', $content);
$content = implode('', file($page));
$content = str_replace('&nbsp;', ' ', $content);
$content2=explode ('<font color="#FF0000">',$content);
$content2[0]=null;
$content2 = explode('<font color="#FF0000">', $content);
$content2[0] = null;
$content=explode ('<a href="http://www.tzxvault.org/',$content);
$content[0]=null;
$content = explode('<a href="http://www.tzxvault.org/', $content);
$content[0] = null;
foreach($content as $row){
if($row){
$url=explode ('"',$row);
$url=$url[0];
$ext=explode('.',$url);
foreach ($content as $row)
{
if ($row)
{
$url = explode('"', $row);
$url = $url[0];
$ext = explode('.', $url);
if(count($ext)>1)
if (count($ext) > 1)
{
$name=explode ('</a>',$row);
$name=strip_tags($name[0]);
$name=explode ('>',$name);
$name=trim($name[1]);
$name = explode('</a>', $row);
$name = strip_tags($name[0]);
$name = explode('>', $name);
$name = trim($name[1]);
$addinf=explode ('<td>',$row);
$publ=explode ('</td>',$addinf[1]);
$publ=trim(strip_tags($publ[0]));
if($publ)$name=$name." (".$publ.")";
$year=explode ('</td>',$addinf[2]);
$year=trim(strip_tags($year[0]));
if($year)$name=$name." (".$year.")";
$url_split=explode('/',$url);
if($name){
$name=$name.".".$ext[count($ext)-1];
}else{
$name=$url_split[count($url_split)-1];
$addinf = explode('<td>', $row);
$publ = explode('</td>', $addinf[1]);
$publ = trim(strip_tags($publ[0]));
if ($publ)
{
$name = $name." (".$publ.")";
}
$year = explode('</td>', $addinf[2]);
$year = trim(strip_tags($year[0]));
if ($year)
{
$name = $name." (".$year.")";
}
$url_split[count($url_split)-1]=null;
$url_split=implode('/',$url_split);
$dirs[$url_split]=$url_split;
$url_split = explode('/', $url);
if(!$r_query[$url]) {
$URLs[]=Array($url,$name);
if ($name)
{
$name = $name.".".$ext[count($ext) - 1];
}
else
{
$name = $url_split[count($url_split) - 1];
}
$url_split[count($url_split) - 1] = null;
$url_split = implode('/', $url_split);
$dirs[$url_split] = $url_split;
if (!$r_query[$url])
{
$found[] = array($url, $name);
$new++;
$r_query[$url]=true;
} else {
$r_query[$url] = true;
}
else
{
$old++;
}
}
}
}
foreach($content2 as $row){
if($row){
$name=explode ('</font>',$row);
$name=$name[0];
$file=str_replace(' ','',$name).".zip";
foreach ($content2 as $row)
{
if ($row)
{
$name = explode('</font>', $row);
$name = $name[0];
$file = str_replace(' ', '', $name).".zip";
$addinf=explode ('<td>',$row);
$publ=explode ('</td>',$addinf[1]);
$publ=trim(strip_tags($publ[0]));
if($publ)$name=$name." (".$publ.")";
$year=explode ('</td>',$addinf[2]);
$year=trim(strip_tags($year[0]));
if($year)$name=$name." (".$year.")";
$addinf = explode('<td>', $row);
$publ = explode('</td>', $addinf[1]);
$publ = trim(strip_tags($publ[0]));
if ($publ)
{
$name = $name." (".$publ.")";
}
$year = explode('</td>', $addinf[2]);
$year = trim(strip_tags($year[0]));
if ($year)
{
$name = $name." (".$year.")";
}
foreach($dirs as $dir)
{
$url=$dir.$file;
if(!$r_query[$url]) {
$URLs[]=Array($url,$name.".zip");
$url = $dir.$file;
if (!$r_query[$url])
{
$found[] = array($url, $name.".zip");
$new++;
$r_query[$url]=true;
} else {
$r_query[$url] = true;
}
else
{
$old++;
}
}
@@ -125,21 +148,21 @@ foreach ($pages as $page)
print "found new ".$new.", old ".$old."\n";
}
sort($URLs);
sort($found);
print "<table><tr><td><pre>";
foreach($URLs as $row)
{
print $row[0]."\n";
}
print "</td><td><pre>";
foreach($URLs as $row)
{
print "<a href=\"http://www.tzxvault.org/".$row[0]."\" target=_blank>".$row[1]."</a>\n";
}
print "</td></tr></table>";
print "<table><tr><td><pre>";
foreach ($found as $row)
{
print $row[0]."\n";
}
print "</td><td><pre>";
foreach ($found as $row)
{
print "<a href=\"http://www.tzxvault.org/".$row[0]."\" target=_blank>".$row[1]."</a>\n";
}
print "</td></tr></table>";
?>

View File

@@ -1,68 +1,80 @@
<?php
// Original code: The Wizard of DATz
print "<pre>";
$r_query=implode ('', file ($_GET["source"]."/ids.txt"));
$r_query=explode ("\r\n",$r_query);
$r_query=array_flip($r_query);
$page="http://tapes.c64.no/main_tapelist.php?group=all&orderby=title";
$page="http://tapes.c64.no/main_tapelist.php?group=all&orderby=title";
print "load ".$page."\n";
print "load ".$page."\n";
$content=implode ('', file ($page));
$content=explode ('<table border=0 cellpadding=0 cellspacing=0 bgcolor="#000000" width="100%">',$content);
$content=explode ('<tr ',$content[1]);
$content[0]=null;
$content=implode ('', file ($page));
$content=explode ('<table border=0 cellpadding=0 cellspacing=0 bgcolor="#000000" width="100%">',$content);
$content=explode ('<tr ',$content[1]);
$content[0]=null;
$new = 0;
$old = 0;
$URLs=Array();
foreach ($content as $row)
{
if ($row)
{
$row = explode('<td>', $row);
$new=0;
$old=0;
$id = explode("<a href='", $row[1]);
$id = explode("'", $id[1]);
$id = $id[0];
foreach($content as $row){
if($row){
$row=explode ('<td>',$row);
$info = array();
$temp = trim(strip_tags($row[3]));
if ($temp)
{
$info[] = $temp;
}
$temp = trim(strip_tags($row[2]));
if ($temp)
{
$info[] = $temp;
}
$temp = trim(strip_tags($row[5]));
if ($temp)
{
$info[] = $temp;
}
$id=explode ("<a href='",$row[1]);
$id=explode ("'",$id[1]);
$id=$id[0];
$name = trim(strip_tags($row[1]))." (".implode(") (", $info).").zip";
$info=array();
$temp=trim(strip_tags($row[3]));
if($temp)$info[]=$temp;
$temp=trim(strip_tags($row[2]));
if($temp)$info[]=$temp;
$temp=trim(strip_tags($row[5]));
if($temp)$info[]=$temp;
$name=trim(strip_tags($row[1]))." (".implode(") (",$info).").zip";
if(!$r_query[$id]) {
$URLs[]=Array($id,$name);
$new++;
} else {
$old++;
}
if (!$r_query[$id])
{
$found[] = array($id, $name);
$new++;
}
else
{
$old++;
}
}
}
print "found new ".$new.", old ".$old."\n";
print "found new ".$new.", old ".$old."\n";
print "<table><tr><td><pre>";
foreach($URLs as $row)
{
print $row[0]."\n";
}
print "</td><td><pre>";
foreach($URLs as $row)
{
print "<a href=\"http://tapes.c64.no/".$row[0]."\" target=_blank>".$row[1]."</a>\n";
}
print "</td></tr></table>";
print "<table><tr><td><pre>";
foreach ($found as $row)
{
print $row[0]."\n";
}
print "</td><td><pre>";
foreach ($found as $row)
{
print "<a href=\"http://tapes.c64.no/".$row[0]."\" target=_blank>".$row[1]."</a>\n";
}
print "</td></tr></table>";
?>

View File

@@ -1,53 +1,53 @@
<?php
// Original code: The Wizard of DATz
print "<pre>";
$r_query=implode ('', file ($_GET["source"]."/ids.txt"));
$r_query=explode ("\r\n","\r\n".$r_query);
$r_query=array_flip($r_query);
$new = 0;
$old = 0;
$URL_Array=array();
$new=0;
$old=0;
$query=implode ('', file ("http://unofficial-cd32-ports.blogspot.co.nz/search?max-results=100"));
$query=explode("<h3 class='post-title entry-title' itemprop='name'>\n<a href='",$query);
$query[0]=null;
foreach($query as $row){
if($row){
$url=explode("'",$row);
$url=$url[0];
$title=explode("</a>",$row);
$title=explode(">",$title[0]);
$title=$title[1];
if(!$r_query[$url])
{
$URL_Array[]=Array($url,$title);
$new++;
} else {
$old++;
}
$query = implode('', file("http://unofficial-cd32-ports.blogspot.co.nz/search?max-results=100"));
$query = explode("<h3 class='post-title entry-title' itemprop='name'>\n<a href='", $query);
$query[0] = null;
foreach ($query as $row)
{
if ($row)
{
$url = explode("'", $row);
$url = $url[0];
$title = explode("</a>", $row);
$title = explode(">", $title[0]);
$title = $title[1];
if (!$r_query[$url])
{
$found[] = array($url, $title);
$new++;
}
else
{
$old++;
}
}
}
print "found new ".$new.", old ".$old."\n";
print "found new ".$new.", old ".$old."\n";
print "<table><tr><td><pre>";
print "<table><tr><td><pre>";
foreach($URL_Array as $row)
{
print "<a href=".$row[0]." target=_blank>".$row[1]."</a>\n";
}
foreach ($found as $row)
{
print "<a href=".$row[0]." target=_blank>".$row[1]."</a>\n";
}
print "</td><td><pre>";
print "</td><td><pre>";
foreach($URL_Array as $row)
{
print "<a href=".$row[0]." target=_blank>".$row[0]."</a>\n";
}
foreach ($found as $row)
{
print "<a href=".$row[0]." target=_blank>".$row[0]."</a>\n";
}
print "</td></tr></table>";
print "</td></tr></table>";
?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,97 +1,101 @@
<?php
print "<pre>";
$r_query=implode ('', file ($_GET["source"]."/ids.txt"));
$r_query=explode ("\r\n","\r\n".$r_query);
$r_query=array_flip($r_query);
$sections=Array(
"number",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
);
// Original code: The Wizard of DATz
$query=implode ('', file ("http://vimm.net/?p=vault"));
$query=explode ('?system=', $query);
array_splice ($query,0,1);
print "<pre>";
$found=Array();
$sections = array(
"number",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
);
foreach($query as $system){
$system=explode ('"', $system);
$system=$system[0];
print "found ".$system."\n";
foreach($sections as $section){
$new=0;
$old=0;
$other=0;
print "load ".$section."\n";
$ids=implode ('', file ("http://vimm.net/vault/?p=list&action=settings&section=".$section."&system=".$system."&v_us=1&v_hacked=1&v_prototype=1&v_foreign=1&v_translated=1&v_unlicensed=1"));
$ids=explode ('"?p=details&amp;id=', $ids);
array_splice ($ids,0,1);
foreach($ids as $id){
$id=explode ('"', $id);
$id=$id[0];
if(!$r_query[$id])
$query = implode('', file("http://vimm.net/?p=vault"));
$query = explode('?system=', $query);
array_splice($query, 0, 1);
foreach ($query as $system)
{
$system = explode('"', $system);
$system = $system[0];
print "found ".$system."\n";
foreach ($sections as $section)
{
$new = 0;
$old = 0;
$other = 0;
print "load ".$section."\n";
$ids = implode('', file("http://vimm.net/vault/?p=list&action=settings&section=".$section."&system=".$system."&v_us=1&v_hacked=1&v_prototype=1&v_foreign=1&v_translated=1&v_unlicensed=1"));
$ids = explode('"?p=details&amp;id=', $ids);
array_splice($ids, 0, 1);
foreach ($ids as $id)
{
$id = explode('"', $id);
$id = $id[0];
if (!$r_query[$id])
{
print "load ".$id."\n";
$page = implode('', file("http://vimm.net/vault/?p=details&id=".$id));
$page = explode('name="download"', $page);
if ($page[1])
{
print "load ".$id."\n";
$page=implode ('', file ("http://vimm.net/vault/?p=details&id=".$id));
$page=explode ('name="download"', $page);
if($page[1])
{
$found[]=Array($id,$system,count($page)-1);
$new++;
}else{
$other++;
}
$found[] = array($id, $system, count($page) - 1);
$new++;
}
else
{
$old++;
$other++;
}
}
print "new: ".$new.", old: ".$old.", other: ".$other."\n";
else
{
$old++;
}
}
print "new: ".$new.", old: ".$old.", other: ".$other."\n";
}
}
print "<table><tr><td><pre>";
foreach($found as $row){
print $row[0]."\n";
print "<table><tr><td><pre>";
foreach ($found as $row)
{
print $row[0]."\n";
}
print "</td></tr></table>";
print "<table><tr><td><pre>";
foreach ($found as $row)
{
for ($y = 1; $y <= $row[2]; $y++)
{
print "wget.exe --post-data \"id=".$row[0]."&fileNumber=".$y."\" --user-agent \"Mozilla/5.0 (Windows NT 5.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0\" --referer \"http://vimm.net/vault/?p=details&id=".$x."\" --output-document \"{".$row[1]."}".$row[0].".".$y.".7z\" http://download.vimm.net/download.php\n";
}
print "</td></tr></table>";
print "<table><tr><td><pre>";
foreach($found as $row){
for($y=1;$y<=$row[2];$y++)
{
print "wget.exe --post-data \"id=".$row[0]."&fileNumber=".$y."\" --user-agent \"Mozilla/5.0 (Windows NT 5.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0\" --referer \"http://vimm.net/vault/?p=details&id=".$x."\" --output-document \"{".$row[1]."}".$row[0].".".$y.".7z\" http://download.vimm.net/download.php\n";
}
}
print "</td></tr></table>";
}
print "</td></tr></table>";
?>

View File

@@ -1,64 +1,63 @@
<?php
$r_query=implode ('', file ($_GET["source"]."/ids.txt"));
$r_query=explode ("\r\n","\r\n".$r_query);
$r_query=array_flip($r_query);
$newURLs=Array();
// Original code: The Wizard of DATz
$dir="http://www.vectrexmuseum.com/mirror/vgdb/";
print "<pre>check folders:\n\n";
print "load: ".$dir."\n";
$new=0;
$old=0;
$new = 0;
$old = 0;
$query=implode ('', file ($dir));
$query=explode('<td bgcolor="#DBDBDB" height="19"><font color="#000000" ><b>Code</b></font> </td>',$query);
$query = implode('', file($dir));
$query = explode('<td bgcolor="#DBDBDB" height="19"><font color="#000000" ><b>Code</b></font> </td>', $query);
$query=explode('</center>',$query[1]);
$query=str_replace(
array("\n",'<span class="small">','</span>'),
array(" ",' (',')'),
$query = explode('</center>', $query[1]);
$query = str_replace(
array("\n", '<span class="small">', '</span>'),
array(" ", ' (', ')'),
$query[0]);
$query=explode('<tr>',$query);
$query = explode('<tr>', $query);
foreach($query as $row){
$row=explode('<td ',$row);
$title=trim(strip_tags( '<td '.$row[2]));
$title=preg_replace('/\s+/'," ",$title);
foreach ($query as $row)
{
$row = explode('<td ', $row);
$title = trim(strip_tags('<td '.$row[2]));
$title = preg_replace('/\s+/', " ", $title);
$title=str_replace(
array("( (","((","))"),
array("(" ,"(" ,")" ),
$title);
$title = str_replace(
array("( (", "((", "))"),
array("(", "(", ")" ),
$title);
$year= trim(strip_tags('<td '.$row[3]));
$manufactor=trim(strip_tags('<td '.$row[4]));
$year = trim(strip_tags('<td '.$row[3]));
$manufactor = trim(strip_tags('<td '.$row[4]));
$url=explode('<a href="',$row[2]);
$url=explode('"',$url[1]);
$url=$url[0];
$url = explode('<a href="', $row[2]);
$url = explode('"', $url[1]);
$url = $url[0];
if($url){
if ($url)
{
print '<span style="display:none" >';
$dl=implode ('', file ($dir.$url));
$dl = implode('', file($dir.$url));
print '</span>';
$dl=explode('<a href="../ROMS/',$dl);
if($dl[1]){
$dl=explode('"',$dl[1]);
$dl=$dl[0];
$dl = explode('<a href="../ROMS/', $dl);
if ($dl[1])
{
$dl = explode('"', $dl[1]);
$dl = $dl[0];
$ext=explode('.',$dl);
$ext=$ext[count($ext)-1];
$ext = explode('.', $dl);
$ext = $ext[count($ext) - 1];
$title=$title." (".$year.") (".$manufactor.").".$ext;
$title = $title." (".$year.") (".$manufactor.").".$ext;
if(!$r_query[$dl])
if (!$r_query[$dl])
{
$newURLs[]=array($title,$dl);
$found[] = array($title, $dl);
$new++;
}
else
@@ -73,14 +72,14 @@ print "new: ".$new.", old: ".$old."\n";
print "\nnew urls:\n\n";
print "<table><tr><td><pre>";
foreach($newURLs as $url)
foreach ($found as $url)
{
print "<a href=\"".$dir."ROMS/".$url[1]."\">".$url[0]."</a>\n";
}
print "</td><td><pre>";
foreach($newURLs as $url)
foreach ($found as $url)
{
print $url[1]."\n";
}

View File

@@ -1,10 +1,45 @@
<?php
function getHTML($target){
// Original code: The Wizard of DATz
$dirs = array(
array('PaperSoft Prima serie','http://vic20.it/papersoft/1-1.html?ckattempt=1'),
array('PaperSoft Prima serie','http://vic20.it/papersoft/1-2.html?ckattempt=1'),
array('PaperSoft Seconda serie','http://vic20.it/papersoft/2-2.html?ckattempt=1'),
array('PaperSoft Terza serie','http://vic20.it/papersoft/3-2.html?ckattempt=1'),
);
print "<pre>check folders:\n\n";
foreach ($dirs as $dir)
{
listDir($dir);
}
print "\nnew urls:\n\n";
print "<table><tr><td><pre>";
foreach ($found as $url)
{
print "<a href=\"http://files.vic20.it/papersoft/programs/".$url[1]."\">".$url[0]."</a>\n";
}
print "</td><td><pre>";
foreach ($found as $url)
{
print $url[1]."\n";
}
print "</td></tr></table>";
function getHTML($target)
{
GLOBAL $GLOBALS;
$timeout = 100; // Max time for stablish the conection
$server = 'vic20.it'; // Ziel domain
$host = 'vic20.it'; // Domain name
//$target = '/new.html'; // Ziel document
@@ -13,25 +48,25 @@ function getHTML($target){
$method = "GET";
if ( is_array( $gets ) ) {
$getValues = '?';
foreach( $gets AS $name => $value ){
$getValues .= urlencode( $name ) . "=" . urlencode( $value ) . '&';
}
$getValues = substr( $getValues, 0, -1 );
$getValues = '?';
foreach( $gets AS $name => $value ){
$getValues .= urlencode( $name ) . "=" . urlencode( $value ) . '&';
}
$getValues = substr( $getValues, 0, -1 );
} else {
$getValues = '';
$getValues = '';
}
if ( is_array( $posts ) ) {
foreach( $posts AS $name => $value ){
$postValues .= urlencode( $name ) . "=" . urlencode( $value ) . '&';
}
$postValues = substr( $postValues, 0, -1 );
$method = "POST";
foreach( $posts AS $name => $value ){
$postValues .= urlencode( $name ) . "=" . urlencode( $value ) . '&';
}
$postValues = substr( $postValues, 0, -1 );
$method = "POST";
} else {
$postValues = '';
$postValues = '';
}
$request = "$method $target$getValues HTTP/1.1\r\n";
$request .= "Accept: ".$GLOBALS[_SERVER][HTTP_ACCEPT]."\r\n";
$request .= "Referer: ".$referer."\r\n";
@@ -50,74 +85,62 @@ function getHTML($target){
$ret = '';
$lastlen=1;
socket_set_timeout($socket, 2);
socket_set_timeout($socket, 2);
while ($lastlen>0)
{
$temp = fread($socket,1024*4);
$lastlen=strlen($temp);
$ret .=$temp;
$ret .=$temp;
}
fclose( $socket );
return $ret;
}
$dirs=Array(
Array('PaperSoft Prima serie','http://vic20.it/papersoft/1-1.html?ckattempt=1'),
Array('PaperSoft Prima serie','http://vic20.it/papersoft/1-2.html?ckattempt=1'),
Array('PaperSoft Seconda serie','http://vic20.it/papersoft/2-2.html?ckattempt=1'),
Array('PaperSoft Terza serie','http://vic20.it/papersoft/3-2.html?ckattempt=1'),
);
$r_query=implode ('', file ($_GET["source"]."/ids.txt"));
$r_query=explode ("\r\n","\r\n".$r_query);
$r_query=array_flip($r_query);
$newURLs=Array();
function listDir($dir){
GLOBAL $newURLs, $r_query;
function listDir($dir)
{
GLOBAL $found, $r_query;
print "load: ".$dir[1]."\n";
$query=getHTML($dir[1]);
$query=str_replace('<div style="text-align: center;">','<p>',$query);
$query=explode('<p><strong><font face="Verdana"><font size="3">',$query);
$query[0]=null;
$query = getHTML($dir[1]);
$query = str_replace('<div style="text-align: center;">','<p>', $query);
$query = explode('<p><strong><font face="Verdana"><font size="3">', $query);
$query[0] = null;
$new=0;
$old=0;
$new = 0;
$old = 0;
foreach($query as $row){
if($row){
$title=explode('<a',$row);
$title=$dir[0]." - ".trim(strip_tags($title[0]));
foreach ($query as $row)
{
if ($row)
{
$title = explode('<a', $row);
$title = $dir[0]." - ".trim(strip_tags($title[0]));
$urls=explode('"http://files.vic20.it/papersoft/programs/',$row);
$urls[0]=null;
foreach($urls as $url){
if($url){
$url=explode('"',$url);
$url=$url[0];
$urls = explode('"http://files.vic20.it/papersoft/programs/', $row);
$urls[0] = null;
foreach ($urls as $url)
{
if ($url)
{
$url = explode('"', $url);
$url = $url[0];
$split=explode('.',$url);
$split = explode('.', $url);
if(!$r_query[$url])
if (!$r_query[$url])
{
$newURLs[]=array($title.' ('.$split[0].').'.$split[1],$url);
$found[] = array($title.' ('.$split[0].').'.$split[1], $url);
$new++;
}
else
{
$old++;
}
}
}
}
}
@@ -125,30 +148,4 @@ function listDir($dir){
print "new: ".$new.", old: ".$old."\n";
}
print "<pre>check folders:\n\n";
foreach($dirs as $dir)
{
listDir($dir);
}
print "\nnew urls:\n\n";
print "<table><tr><td><pre>";
foreach($newURLs as $url)
{
print "<a href=\"http://files.vic20.it/papersoft/programs/".$url[1]."\">".$url[0]."</a>\n";
}
print "</td><td><pre>";
foreach($newURLs as $url)
{
print $url[1]."\n";
}
print "</td></tr></table>";
?>