'; if (!$_REQUEST["url"]){ die("Specify an url of an image file listing"); } ?> Gallery for <? echo $_REQUEST["url"]; ?> " . urlencode($_REQUEST["url"]) . ""); $NOSAVE = 1; include('../input.phps'); // CURL input // echo(htmlspecialchars($file_contents)); // echo "**********************\n\n\n"; function get_urls($string, $strict=true) { $types = array("href", "src", "url"); while(list(,$type) = each($types)) { $innerT = $strict?'[a-z0-9:?=&@/._-]+?':'.+?'; preg_match_all ("|$type\=([\"'`])(".$innerT.")\\1|i", $string, &$matches); $ret[$type] = $matches[2]; } return $ret; }; $imagelist = get_urls($file_contents); $imagelist = $imagelist["href"]; foreach ($imagelist as $value) { // print_r($value); if (preg_match ("/jpg/i", $value)) { echo("
$value
"); } } ?>