« Previous@'; preg_match($regex, $html, $prevMatch); if (empty($prevMatch[1])) { echo "No previous URL found!\n"; return; } $html = @file_get_contents($prevMatch[1]); if (!$html) { echo "Failed to load previous page!\n"; return; } preg_match('@/betterdays/comic/(.+\\.(jpg|png|gif))@', $html, $matches); if (empty($matches[1])) { echo "No image found on page!\n"; return; } usleep(5e5); }