(.*?)#', $page, $match); $product = $match[1]; preg_match('#.*?#s', $page, $match); preg_match_all('#.*?.*?

(.*?) -#s', $match[0], $match, PREG_SET_ORDER); $count = 0; $items = 0; for ($i = 0; $i < count($match); $i++) { $tmp = $match[$i]; if (strtotime($tmp[2]) < strtotime('-6 months')) { break; } else { $count++; preg_match('#

.*?

#s', file_get_contents($tmp[1]), $page); if ($j = strpos($page[0], "$product")) $page[0] = substr($page[0], $j, strpos($page[0], '', $j) - $j); $items += substr_count($page[0], '
  • '); } } echo "In the past 6 months, $product has had $count updates with a total of $items items."; } getUpdates($_GET['appid']); ?>