"; $detsuff=""; if (!isset($argc)) { $arr_browsers = ["MSIE", "Edge"]; // thanks to https://artisansweb.net/detect-browser-php-javascript/ $agent = $_SERVER['HTTP_USER_AGENT']; foreach ($arr_browsers as $browser) { if (strpos($agent, $browser) !== false) { $detpref=""; $detsuff=""; $isIE=true; break; } } } else { $detpref=""; $detsuff=""; } function valit($inname, $indef) { global $scriptis, $detpref, $detsuff, $formis; if (!isset($argc)) { if (isset($_GET[$inname])) { if ($formis == "" && $detpref == strtoupper($detpref) && $detpref != "") { $detpref=strtolower($detpref); $detsuff=strtolower($detsuff); $formis=str_replace("", "Image Find Parameters",$detpref); if ($scriptis == "") { $scriptis="
" . strtolower($detsuff); } } else { $detpref=""; $detsuff=""; } if ($inname == "wo" || $inname == "ho" || $inname == "wsort" || $inname == "hsort" || $inname == "fsort") { if ($scriptis == "") { $scriptis=" " . strtolower($detsuff); } $scriptis=str_replace(" 1) { $subsub=explode("href=", $subbits[1]); $retct.=$subbits[0] . ""; $formis.="
" . $datais . "
Relative PathFilespec Width OperatorWidth Height OperatorHeight


"; $formis.=$scriptis; $htmlis="Find Images Via Size - RJM Programming - October, 2019

Find Images Via Size RJM Programming - October, 2019

" . $formis . "

"; $lastsed=""; if (PHP_OS=='WINNT' || PHP_OS=='WIN32' || PHP_OS=='Windows') { $lastsed=" | sed 's/\\(\\ \\)\\(\\.[^\\<]*\\)/\\ \\\\\\<\\/img\\>\\2\\<\\/a\\>/g' "; } else { $lastsed=" | sed 's/\\(\\ \\)\\(\\.[^\\<]*\\)/\\ \\\\\\<\\/img\\>\\2\\<\\/a\\>/g' "; } // | sed '/\\\\ \\\\.[^\\\\<]*/s//\\\\1/g' // | sed '/\\\\(\\\\ \\\\)\\\\(\\\\.[^\\\\<]*\\\\)/s// \\\\2\\\\<\\\\/a\\\\>/g' // ksh -c "echo '123 x 567 ./x.x' | sed '/\\(\\ \\)\\(\\.[^\\<]*\\)/s// \\2\\<\\/a\\>/g' " if (isset($_GET['filespec'])) { //$cf="find " . (str_replace("+"," ",$_GET['path'])) . " -name '" . str_replace("+"," ",$_GET['filespec']) . "' -exec file {} \; | grep ' image data' | sed 's/JFIF standard 1.01, aspect ratio, //g' | sed 's/\(." . explode(".",str_replace("+"," ",$_GET['filespec']))[1] . "\): .* \([0-9]* x [0-9]*\).*/\\2 \\1/' | awk 'int($1) " . str_replace("+"," ",$_GET['wo']) . " " . str_replace("+"," ",$_GET['wv']) . " && int($3) " . str_replace("+"," ",$_GET['ho']) . " " . str_replace("+"," ",$_GET['hv']) . " {print}' | sed 's/\\(\\ \\)\\(\\.[^\\<]*\\)/\\ \\\\2\\<\\/a\\>/g'"; //echo 'cd ' . dirname(__FILE__) . '; ' . $cf . ''; if (PHP_OS=='WINNT' || PHP_OS=='WIN32' || PHP_OS=='Windows') { $cf="find " . (str_replace("+"," ",$_GET['path'])) . " -name '" . str_replace("+"," ",$_GET['filespec']) . "' -exec file {} \; | sed '/\ precision\ [0-9]*\, /s//`/g' | grep ' image data' | sed 's/\(JFIF [^\`]*\)`\([0-9]*\)x\([0-9]*\)/\\2 x \\3/g' | sed 's/\(." . explode(".",str_replace("+"," ",$_GET['filespec']))[1] . "\): .* \([0-9]* x [0-9]*\).*/\\2 \\1/' | awk 'int($1) " . str_replace("+"," ",$_GET['wo']) . " " . valit('wv',str_replace("+"," ",$_GET['wv'])) . " && int($3) " . str_replace("+"," ",$_GET['ho']) . " " . valit('hv',str_replace("+"," ",$_GET['hv'])) . " {print}' " . $sortbit . $lastsed . " > " . dirname(__FILE__) . substr("\\",0,1) . "find_images_via_size.txt 2> " . dirname(__FILE__) . substr("\\",0,1) . "find_images_via_size.err"; exec('cd ' . dirname(__FILE__) . '; ' . $cf . ''); //find ' . (str_replace("+"," ",$_GET['path'])) . " -name '" . str_replace("+"," ",$_GET['filespec']) . "' -exec file {} \\; | grep ' image data' | sed 's/\\(." . explode(".",str_replace("+"," ",$_GET['filespec']))[1] . "\\): .* \\([0-9]* x [0-9]*\\).*/\\2 \\1/' | awk 'int($1) " . str_replace("+"," ",$_GET['wo']) . " " . str_replace("+"," ",$_GET['wv']) . " && int($3) " . str_replace("+"," ",$_GET['ho']) . " " . str_replace("+"," ",$_GET['hv']) . " {print}' | sed 's/\\(\\ \\)\\(\\.[^\\<]*\\)/\\ \\\\2\\<\\/a\\>/g' > " . dirname(__FILE__) . substr("\\",0,1) . "find_images_via_size.txt 2> " . dirname(__FILE__) . substr("\\",0,1) . "find_images_via_size.err"); } else { // | sed '/\\\\ \\\\.[^\\\\<]*/s/\\\\1/g' $cf="find " . (str_replace("+"," ",$_GET['path'])) . " -name '" . str_replace("+"," ",$_GET['filespec']) . "' -exec file {} \; | sed '/\ precision\ [0-9]*\, /s//`/g' | grep ' image data' | sed 's/\(JFIF [^\`]*\)`\([0-9]*\)x\([0-9]*\)/\\2 x \\3/g' | sed 's/\(." . explode(".",str_replace("+"," ",$_GET['filespec']))[1] . "\): .* \([0-9]* x [0-9]*\).*/\\2 \\1/' | awk 'int($1) " . str_replace("+"," ",$_GET['wo']) . " " . valit('wv',str_replace("+"," ",$_GET['wv'])) . " && int($3) " . str_replace("+"," ",$_GET['ho']) . " " . valit('hv',str_replace("+"," ",$_GET['hv'])) . " {print}' " . $sortbit . $lastsed . " > " . dirname(__FILE__) . "/" . "find_images_via_size.txt 2> " . dirname(__FILE__) . "/" . "find_images_via_size.err"; //echo 'cd ' . dirname(__FILE__) . '; ' . str_replace("<","<",str_replace(">",">",$cf)) . ''; //exit; exec('cd ' . dirname(__FILE__) . '; ' . $cf . ''); //find ' . (str_replace("+"," ",$_GET['path'])) . " -name '" . str_replace("+"," ",$_GET['filespec']) . "' -exec file {} \\; | grep ' image data' | sed 's/JFIF standard 1.01, aspect ratio, //g' | sed 's/\\(." . explode(".",str_replace("+"," ",$_GET['filespec']))[1] . "\\): .* \\([0-9]* x [0-9]*\\).*/\\2 \\1/' | awk 'int($1) " . str_replace("+"," ",$_GET['wo']) . " " . str_replace("+"," ",$_GET['wv']) . " && int($3) " . str_replace("+"," ",$_GET['ho']) . " " . str_replace("+"," ",$_GET['hv']) . " {print}' | sed 's/\\(\\ \\)\\(\\.[^\\<]*\\)/\\ \\\\2\\<\\/a\\>/g' > " . dirname(__FILE__) . "/" . "find_images_via_size.txt 2> " . dirname(__FILE__) . "/" . "find_images_via_size.err"); } // //passthru("find " . str_replace("+"," ",$_GET['path']) . " -name '" . str_replace("+"," ",$_GET['filespec']) . "' -exec file {} \; | sed 's/\(." . explode(".",str_replace("+"," ",$_GET['filespec']))[1] . "\): .* \([0-9]* x [0-9]*\).*/\2 \1/' | awk 'int($1) " . str_replace("+"," ",$_GET['wo']) . " " . str_replace("+"," ",$_GET['wv']) . " && int($3) " . str_replace("+"," ",$_GET['ho']) . " " . str_replace("+"," ",$_GET['hv']) . " {print}'"); echo explode("

", $htmlis)[0] . "
Width (px)Height (px)Image
" . str_replace(" ","",str_replace("\n","
",huhit(file_get_contents("find_images_via_size.txt")))) . "
" . "

" . explode("

", $htmlis)[1]; // //echo file_get_contents("find_images_via_size.txt"); } else { echo $htmlis; } exit;