\n"; foreach ($pages as $page) { echo "".$page.""; $query = get_data("http://remotecpu.com/".$page); preg_match("/Category: (.*?)<\/b>/", $query, $category); $category = $category[1]; preg_match_all("//", $query, $urls); $urls = $urls[1]; if (sizeof($urls) == 0) { echo "Found new: 0, old: 0\n"; continue; } $new = 0; $old = 0; foreach ($urls as $url) { $gamepage = get_data("http://remotecpu.com/".$url); preg_match("/System<\/td>(.*?)<\/strong><\/tr>/", $gamepage, $system); $system = trim($system[1]); preg_match("/.*?.*?(.*?)<\/span><\/td>/s", $gamepage, $name); $name = trim($name[1]); $title = "{".$system."}".$name." (".$category.")"; $id = explode("/", $url); $id = $id[sizeof($id) - 1]; $id = explode("-", $id); $id = $id[0]; if (!$r_query[$id]) { // This link is outdated, but without registration it's impossible to get the updated link $found[] = array($title, "http://c64warez.com/files/get_file/".$id); $new++; $r_query[$id] = true; } else { $old++; } } echo "Found new: ".$new.", old: ".$old."\n"; } echo "\n"; if (sizeof($found) > 0) { echo "

New files:

"; } foreach ($found as $row) { echo "
".$row[0]."
\n"; } echo "
\n"; ?>