/** * is_quizfile * * @param xxx $sourcefile * @return xxx */ public static function is_quizfile($sourcefile) { // e.g. http://www.qedoc.net/library/PLJUB_019.zip $search = '/http:\\/\\/www\\.qedoc.(?:com|net)\\/library\\/\\w+\\.zip/i'; return preg_match($search, $sourcefile->get_source()); // Note: we may want to detect the following as well: // http://www.qedoc.net/qqp/jnlp/PLJUB_019.jnlp }