0) { //file_put_contents('x.x','1'); if (strpos(strtolower(str_replace('+',' ',urldecode($_GET['infilegetsize']))), '.txt') !== false) { //file_put_contents('x.x','11 ' . strtolower(str_replace('+',' ',urldecode($_GET['infilegetsize'])))); if (strpos(strtolower(str_replace('+',' ',urldecode($_GET['infilegetsize']))), '.txt;') !== false) { //file_put_contents('x.xx','111'); if (!file_exists(explode(';', str_replace('+',' ',urldecode($_GET['infilegetsize'])))[0])) { //file_put_contents('x.xxx','1111'); file_put_contents(explode(';', str_replace('+',' ',urldecode($_GET['infilegetsize'])))[0], ''); } //file_put_contents('x.xxxx','11111'); if (strpos(explode(';', str_replace('"','',str_replace('+',' ',urldecode($_GET['infilegetsize']))))[1], '.') !== false) { if (strpos(file_get_contents(explode(';', str_replace('+',' ',urldecode($_GET['infilegetsize'])))[0]), "" . basename(explode(';', str_replace('"','',str_replace('+',' ',urldecode($_GET['infilegetsize']))))[1]) . "'") === false) { file_put_contents(explode(';', str_replace('+',' ',urldecode($_GET['infilegetsize'])))[0], file_get_contents(explode(';', str_replace('+',' ',urldecode($_GET['infilegetsize'])))[0]) . "file '" . explode(';', str_replace('"','',str_replace('+',' ',urldecode($_GET['infilegetsize']))))[1] . "'" . "\n"); } } } else { //file_put_contents('x.xxxx','111111'); file_put_contents(str_replace('+',' ',urldecode($_GET['infilegetsize'])), ''); } } else { //file_put_contents('x.xxxx','111111'); file_put_contents(str_replace('+',' ',urldecode($_GET['infilegetsize'])), ''); } } exit; } if (isset($_GET['ffmpeg'])) { $fnd=false; if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { if (file_exists('./ffmpeg.txt')) { $pplace=file_get_contents('./ffmpeg.txt'); if (strpos($pplace, 'ffmpeg.exe') !== false) { $fnd=true; } } if (!$fnd) { $huhexe=shell_exec("where ffmpeg.exe"); if ($huhexe == '') { $huhexes=rglob("C:\\ffmpeg.exe"); //shell_exec("where pdfimages.exe"); if (sizeof($huhexes) > 0) { file_put_contents('./ffmpeg.txt', $huhexes[0]); if (strpos($huhexes[0], ' ') !== false) { $huhexes[0]=str_replace('"','',$huhexes[0]); echo ""; } else { $huhexes[0]=str_replace('"','',$huhexes[0]); echo ""; } } } } } exit; } if (isset($_GET['pandoc'])) { $fnd=false; if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { if (file_exists('./pandoc.txt')) { $pplace=file_get_contents('./pandoc.txt'); if (strpos($pplace, 'pandoc.exe') !== false) { $fnd=true; } } if (!$fnd) { $huhexe=shell_exec("where pandoc.exe"); if ($huhexe == '') { $huhexes=rglob("C:\\pandoc.exe"); //shell_exec("where pdfimages.exe"); if (sizeof($huhexes) > 0) { file_put_contents('./pandoc.txt', $huhexes[0]); if (strpos($huhexes[0], ' ') !== false) { $huhexes[0]=str_replace('"','',$huhexes[0]); echo ""; } else { $huhexes[0]=str_replace('"','',$huhexes[0]); echo ""; } } } } } exit; } if (isset($_GET['magick'])) { $fnd=false; if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { if (file_exists('./magick.txt')) { $pplace=file_get_contents('./magick.txt'); if (strpos($pplace, 'magick.exe') !== false) { $fnd=true; } } if (!$fnd) { $huhexe=shell_exec("where magick.exe"); if ($huhexe == '') { $huhexes=rglob("C:\\magick.exe"); //shell_exec("where magick.exe"); if (sizeof($huhexes) > 0) { file_put_contents('./magick.txt', $huhexes[0]); } } } } exit; } if (isset($_GET['pdfimages'])) { $fnd=false; if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { if (file_exists('./pdfimages.txt')) { $pplace=file_get_contents('./pdfimages.txt'); if (strpos($pplace, 'pdfimages.exe') !== false) { $fnd=true; } } if (!$fnd) { $huhexe=shell_exec("where pdfimages.exe"); if ($huhexe == '') { $huhexes=rglob("C:\\pdfimages.exe"); //shell_exec("where pdfimages.exe"); if (sizeof($huhexes) > 0) { file_put_contents('./pdfimages.txt', $huhexes[0]); } } } } exit; } $rotateadvice="Rotate a video Rotate 90 clockwise: ffmpeg -i in.mov -vf \"transpose=1\" out.mov For the transpose parameter you can pass: 0 = 90CounterCLockwise and Vertical Flip (default) 1 = 90Clockwise 2 = 90CounterClockwise 3 = 90Clockwise and Vertical Flip Use -vf \"transpose=2,transpose=2\" for 180 degrees."; $rs=''; $outf=''; if (isset($_GET['fcommand'])) { if (PHP_OS == "Darwin") { putenv('PATH=/usr/local/bin'); } //file_put_contents('x.x', str_replace('+',' ',urldecode($_GET['fcommand']))); $cmdis=str_replace('+',' ',urldecode($_GET['fcommand'])); if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { if ($ffmpegpre != '' && strpos($cmdis, 'ffmpeg.') !== false && strpos($cmdis, $ffmpegpre) === false) { $cmdis=str_replace('ffmpeg.', $ffmpegpre . 'ffmpeg.', $cmdis); } if ($magickpre != '' && strpos($cmdis, $magickverb . '.') !== false && strpos($cmdis, $magickpre) === false) { $cmdis=str_replace($magickverb . '.', $magickpre . $magickverb . '.', $cmdis); } if ($pdfimagespre != '' && strpos($cmdis, 'pdfimages.') !== false && strpos($cmdis, $pdfimagespre) === false) { $cmdis=str_replace('pdfimages.', $pdfimagespre . 'pdfimages.', $cmdis); } if ($pandocpre != '' && strpos($cmdis, 'pandoc.') !== false && strpos($cmdis, $pandocpre) === false) { $cmdis=str_replace('pandoc.', $pandocpre . 'pandoc.', $cmdis); } } //file_put_contents('x7.x7', $cmdis); $precmd=explode('>', $cmdis); $outf=''; $pgif=''; $pxml=''; $pdocx=''; if (strpos($cmdis, '.gif"') !== false) { $pgif='"' . explode('"', explode('.gif"', $cmdis)[0])[-1 + sizeof(explode('"', explode('.gif"', $cmdis)[0]))] . '.gif"'; $outf=$pgif; } else if (strpos($cmdis, '.GIF"') !== false) { $pgif='"' . explode('"', explode('.GIF"', $cmdis)[0])[-1 + sizeof(explode('"', explode('.GIF"', $cmdis)[0]))] . '.GIF"'; $outf=$pgif; } else if (strpos($cmdis, '.gif') !== false) { $pgif='' . explode(' ', explode('.gif', $cmdis)[0])[-1 + sizeof(explode(' ', explode('.gif', $cmdis)[0]))] . '.gif'; $outf=$pgif; } else if (strpos(strtolower($cmdis), '.GIF') !== false) { $pgif='' . explode(' ', explode('.GIF', $cmdis)[0])[-1 + sizeof(explode(' ', explode('.GIF', $cmdis)[0]))] . '.GIF'; $outf=$pgif; } if (strpos($cmdis, '.xml"') !== false) { $pxml='"' . explode('"', explode('.xml"', $cmdis)[0])[-1 + sizeof(explode('"', explode('.xml"', $cmdis)[0]))] . '.xml"'; $outf=$pxml; } else if (strpos($cmdis, '.XML"') !== false) { $pxml='"' . explode('"', explode('.XML"', $cmdis)[0])[-1 + sizeof(explode('"', explode('.XML"', $cmdis)[0]))] . '.XML"'; $outf=$pxml; } else if (strpos($cmdis, '.xml') !== false) { $pxml='' . explode(' ', explode('.xml', $cmdis)[0])[-1 + sizeof(explode(' ', explode('.xml', $cmdis)[0]))] . '.xml'; $outf=$pxml; } else if (strpos(strtolower($cmdis), '.XML') !== false) { $pxml='' . explode(' ', explode('.XML', $cmdis)[0])[-1 + sizeof(explode(' ', explode('.XML', $cmdis)[0]))] . '.XML'; $outf=$pxml; } if (strpos($cmdis, '.docx"') !== false) { $pdocx='"' . explode('"', explode('.docx"', $cmdis)[0])[-1 + sizeof(explode('"', explode('.docx"', $cmdis)[0]))] . '.docx"'; $outf=$pdocx; } else if (strpos($cmdis, '.DOCX"') !== false) { $pdocx='"' . explode('"', explode('.DOCX"', $cmdis)[0])[-1 + sizeof(explode('"', explode('.DOCX"', $cmdis)[0]))] . '.DOCX"'; $outf=$pdocx; } else if (strpos($cmdis, '.docx') !== false) { $pdocx='' . explode(' ', explode('.docx', $cmdis)[0])[-1 + sizeof(explode(' ', explode('.docx', $cmdis)[0]))] . '.docx'; $outf=$pdocx; } else if (strpos(strtolower($cmdis), '.DOCX') !== false) { $pdocx='' . explode(' ', explode('.DOCX', $cmdis)[0])[-1 + sizeof(explode(' ', explode('.DOCX', $cmdis)[0]))] . '.DOCX'; $outf=$pdocx; } if ((strpos($cmdis, 'pdfimages') !== false || strpos($cmdis, 'pdftohtml') !== false || strpos($cmdis, 'pandoc') !== false) && strpos($cmdis, 'newfolder_') !== false && strpos(strtolower($cmdis), '.rtf') === false && strpos(strtolower($cmdis), '.docx') === false) { $pfolder='newfolder_' . explode(' ', explode(DIRECTORY_SEPARATOR, explode('newfolder_', $cmdis)[1])[0])[0]; //file_put_contents('x8a.x8a', $pfolder); $beforep=explode($pfolder, $cmdis)[0]; $afterp=explode($pfolder, $cmdis)[1]; while (file_exists($pfolder)) { $pfolder='newfolder' . '_' . explode('newfolder', $pfolder)[1]; $cmdis=$beforep . $pfolder . $afterp; } if (!file_exists($pfolder)) { mkdir($pfolder); } } if (strpos($precmd[0], '.ass') !== false && file_exists('sub.ass')) { unlink('sub.ass'); } if (strpos($precmd[0], ' list.txt ') !== false && file_exists('list.txt')) { file_put_contents('list.txt', str_replace("'file '", "'" . "\n" . "file '", file_get_contents('list.txt'))); } //file_put_contents('x7a.x7a', $cmdis . ' ... ' . trim(str_replace('~!@','',str_replace(' -c COPY -',' -c copy -',str_replace('.ass ','.ass-shortest ',str_replace(' -c copy ',' -c copy -shortest ',str_replace(' -c copy -',' -c COPY -',str_replace('\" ~!@','\"-shortest ',str_replace('\" ~!@','\"-shortest ',($precmd[0] . '~!@')))))))))); $subcmd=explode('-shortest ', trim(str_replace('~!@','',str_replace(' -c COPY -',' -c copy -',str_replace('.ass ','.ass-shortest ',str_replace(' -c copy ',' -c copy -shortest ',str_replace(' -c copy -',' -c COPY -',str_replace('transpose=3" ','transpose=3"-shortest ',str_replace('transpose=2" ','transpose=2"-shortest ',str_replace('transpose=1" ','transpose=1"-shortest ',str_replace('transpose=0" ','transpose=0"-shortest ',str_replace('-auto-orient','-auto-orient-shortest ',str_replace(' -oo ',' -oo-shortest ',str_replace(' -o ','-o-shortest ',str_replace(' -y ','-y-shortest ',($precmd[0] . '')))))))))))))))); //file_put_contents('x1777.x1777', $subcmd[0]); if ($outf != '' || sizeof($subcmd) > 1) { if ($outf == '') { $outf=$subcmd[1]; } //file_put_contents('x777.x777', $outf); if (file_exists($outf)) { $wassuff=''; while (file_exists($outf . '_was' . $wassuff)) { //file_put_contents('x77777.x77777', $outf . '_was' . $wassuff); if ($wassuff == '') { $wassuff='0'; } else { $wassuff='' . (1 + intval('' . $wassuff)); } } //file_put_contents('x7777.x7777', $outf . '_was' . $wassuff); rename($outf, $outf . '_was' . $wassuff); } if (strpos(strtolower(trim($outf) . '~'), '.pdf~') !== false) { $ppdf=trim($outf); } } //file_put_contents('x77.x77', $cmdis); if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $cmdis=str_replace(' > ', ' 2> ', $cmdis); } //file_put_contents('x.x', $outf . ' ' . $cmdis); $rs=shell_exec($cmdis); //file_put_contents('xx.xx', $rs); if ($pgif != '') { $rs.='

'; $outf=''; } if ($pxml != '') { $rs.="

"; $outf=''; } if ($pdocx != '') { $rs.="

"; if (strpos(realpath($outf), $_SERVER['DOCUMENT_ROOT']) !== false) { $wostuff=" window.open('." . str_replace($_SERVER['DOCUMENT_ROOT'],'',realpath($outf)) . "','_blank','top=60,left=60,width=560,height=160'); "; } else { $wostuff=" window.open('file:" . realpath($outf) . "','_blank','top=60,left=60,width=560,height=160'); "; } //if (PHP_OS == "Darwin") { // exec('open ' . $outf); //} else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { // exec($outf); //} $outf=''; } if ($pfolder != '') { if (strpos($cmdis, 'pandoc') !== false || strpos($cmdis, 'pdftohtml') !== false) { $rs.="

"; } else { foreach (glob($pfolder . DIRECTORY_SEPARATOR . '*.*') as $ifilename) { $rs.=''; } } //if (PHP_OS == "Darwin") { // $rs.='

Video and Audio and Image and PDF Files ...
' . str_replace("\n","
",yourshell_exec("file *.* | egrep -B 0 'ISO Media| image |Audio|WebM|Matroska|.ts:|.srt:|.txt:|.pdf:|.PDF:'")) . '
'; //} else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { // $rs.='

Video and Audio and Image and PDF Files ...
' . str_replace("\n","
",yourshell_exec('"C:\\Program Files (x86)\\GnuWin32\\bin\\file.exe" *.*')) . '
'; //} } if ($ppdf != '' || strpos(strtolower($outf), '.rtf') !== false) { $srcbit=' src='; if ($ppdf == '') { $ppdf=file_get_contents($outf); $srcbit=' srcdoc='; } $outf=''; if (strpos($srcbit, 'src=') !== false) { $rs.="

"; } else { $rs.="

"; if (strpos(realpath($outf), $_SERVER['DOCUMENT_ROOT']) !== false) { $wostuff=" window.open('." . str_replace($_SERVER['DOCUMENT_ROOT'],'',realpath($outf)) . "','_blank','top=60,left=60,width=560,height=160'); "; } else { $wostuff=" window.open('file:" . realpath($outf) . "','_blank','top=60,left=60,width=560,height=160'); "; } //if (PHP_OS == "Darwin") { // exec('open ' . $outf); //} else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { // exec($outf); //} } //if (PHP_OS == "Darwin") { // $rs.='

Video and Audio and Image and PDF Files ...
' . str_replace("\n","
",yourshell_exec("file *.* | egrep -B 0 'ISO Media| image |Audio|WebM|Matroska|.ts:|.srt:|.txt:|.pdf:|.PDF:'")) . '
'; //} else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { // $rs.='

Video and Audio and Image and PDF Files ...
' . str_replace("\n","
",yourshell_exec('"C:\\Program Files (x86)\\GnuWin32\\bin\\file.exe" *.*')) . '
'; //} } if ($outf != '') { if (file_exists($outf)) { if (strpos($cmdis, '"') !== false) { $rs.="

'; } else { $rs.='

'; } if (PHP_OS == "Darwin") { $rs.='

Video and Audio and Image and Text and PDF Files ...
' . str_replace("\n","
",yourshell_exec("file * | egrep -B 0 'ISO Media| image |Audio|WebM|Matroska|.ts:|.srt:|.txt:|.pdf:|.PDF:'")) . '
'; } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $rs.='

Video and Audio and Image and Text and PDF Files ...
' . str_replace("\n","
",yourshell_exec('"C:\\Program Files (x86)\\GnuWin32\\bin\\file.exe" *')) . '
'; } } } } else if (PHP_OS == "Darwin") { $rs.='
Video and Audio and Image and Text and PDF Files ...
' . str_replace("\n","
",yourshell_exec("file *.* | egrep -B 0 'ISO Media| image |Audio|WebM|Matroska|.ts:|.srt:|.txt:|.pdf:|.PDF:'")) . '
'; } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $rs.='
Video and Audio and Image and Text and PDF Files ...
' . str_replace("\n","
",yourshell_exec('"C:\\Program Files (x86)\\GnuWin32\\bin\\file.exe" *.*')) . '
'; } $ddn=substr(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR,0,1); $dn=''; $minuspng='-png'; $ffmpegpre=''; $ffmpegsuf=''; $pdfimagespre=''; $pdfimages='pdfimages'; $pdfimagessuf=''; $whereffmpeg="?infilegetsize="; $wheremagick="?infilegetsize="; $wherepandoc="?infilegetsize="; $pandoc='pandoc'; $pandocpre=''; $pandocsuf=''; $magickverb='convert'; $magickpre=''; $magicksuf=''; $startlook='000'; $zerotothree='%03'; $wherepdfimages="?infilegetsize="; if (PHP_OS == "Darwin") { $dn=' /dev/null'; } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $minuspng=''; $startlook='0000'; $zerothree='%04'; $ddn=DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; $magickverb='magick'; $magickpre="\"C:\\Program Files\\ImageMagick-7.1.0-Q16-HDRI\\"; $magicksuf=".exe\""; if (!file_exists($magickpre . 'magick' . $magicksuf)) { if (file_exists('./magick.txt')) { if (!file_exists(file_get_contents('./magick.txt'))) { unlink('./magick.txt'); $wheremagick="?magick=where"; } else { $magickpre="\"" . str_replace('magick.exe','',file_get_contents('./magick.txt')) . "\""; } } if (file_exists('magick' . $ffmpegsuf)) { $magickpre=""; } else if (!file_exists('./magick.txt')) { $huhexe=shell_exec("where magick.exe"); if (strpos($huhexe, 'magick.exe') === false) { $wheremagick="?magick=where"; } else { $magickpre=str_replace('magick.exe','',$huhexe); } } } $ffmpegpre="\"C:\\Program Files\\ImageMagick-7.1.0-Q16-HDRI\\"; $ffmpegsuf=".exe\""; if (!file_exists($ffmpegpre . 'ffmpeg' . $ffmpegsuf)) { if (file_exists('./ffmpeg.txt')) { if (!file_exists(file_get_contents('./ffmpeg.txt'))) { unlink('./ffmpeg.txt'); $whereffmpeg="?ffmpeg=where"; } else { $ffmpegpre="\"" . str_replace('ffmpeg.exe','',file_get_contents('./ffmpeg.txt')) . "\""; } } if (file_exists('ffmpeg' . $ffmpegsuf)) { $ffmpegpre=""; } else if (!file_exists('./ffmpeg.txt')) { $huhexe=shell_exec("where ffmpeg.exe"); if (strpos($huhexe, 'ffmpeg.exe') === false) { $whereffmpeg="?ffmpeg=where"; } else { $ffmpegpre=str_replace('ffmpeg.exe','',$huhexe); } } } $pandocpre="\"C:\\Program Files\\ImageMagick-7.1.0-Q16-HDRI\\"; $pandocsuf=".exe\""; if (!file_exists($pandocpre . 'pandoc' . $pandocsuf)) { if (file_exists('./pandoc.txt')) { if (!file_exists(file_get_contents('./pandoc.txt'))) { unlink('./pandoc.txt'); $wherepandoc="?pandoc=where"; } else { $pandocpre="\"" . str_replace('pandoc.exe','',file_get_contents('./pandoc.txt')) . "\""; } } if (file_exists('pandoc' . $pandocsuf)) { $pandocpre=""; } else if (!file_exists('./pandoc.txt')) { $huhexe=shell_exec("where pandoc.exe"); if (strpos($huhexe, 'pandoc.exe') === false) { $wherepandoc="?pandoc=where"; } else { $pandocpre=str_replace('pandoc.exe','',$huhexe); } } } $pdfimagespre="\"C:\\MAMP\\htdocs\\xpdf-tools-win-4.04\\bin32\\"; $pdfimagessuf=".exe\""; if (!file_exists($pdfimagespre . 'pdfimages' . $pdfimagessuf)) { if (file_exists('./pdfimages.txt')) { if (!file_exists(file_get_contents('./pdfimages.txt'))) { unlink('./pdfimages.txt'); $wherepdfimages="?pdfimages=where"; } else { $pdfimagespre="\"" . str_replace('pdfimages.exe','',file_get_contents('./pdfimages.txt')) . "\""; } } if (file_exists('pdfimages' . $pdfimagessuf)) { $pdfimagespre=""; } else if (!file_exists('./pdfimages.txt')) { $huhexe=shell_exec("where pdfimages.exe"); if (strpos($huhexe, 'pdfimages.exe') === false) { $wherepdfimages="?pdfimages=where"; } else { $pdfimagespre=str_replace('pdfimages.exe','',$huhexe); } } } } function scandir_through($dir, $bname, $bsize) { // thanks to https://www.php.net/manual/en/function.glob.php $ds=substr((DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR),0,1); if (strpos(('!@' . strtoupper($dir)), '!@C:') !== false) { $dir=str_replace('/','',$dir); } if (substr(strrev($dir),0,1) == substr((DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR),0,1)) { $ds=''; } $items = glob($dir . $ds . str_replace(' ','*',$bname)); for ($i = 0; $i < count($items); $i++) { if (is_dir($items[$i])) { $add = glob($items[$i] . $ds . str_replace(' ','*',$bname)); if (filesize($add) == $bsize) { //echo $add; $items = array_merge($items, $add); } //else { //echo 'x' . $add . 'x'; //} } } return $items; } function yourshell_exec($incm) { //file_put_contents('xx.xx', $incm); $one="1"; $two="2"; $outblurb=" document.getElementById('mydet').style.display='none'; "; $partsare=explode("'", $incm); //file_put_contents('xx.xx', '' . sizeof($partsare)); if (sizeof($partsare) == 3) { if (strpos($incm, ' * ') !== false && strpos($incm, ' | ') !== false) { $incm=trim(explode(' | ', $incm)[0]) . '.*'; $two=$one; //file_put_contents('xxm.xxm', '' . $incm); } } $blurblines=shell_exec($incm); if (trim($blurblines) != '') { //file_put_contents('xxx.xxx', $blurblines); $outblurb=""; $obs=explode("\n", $blurblines); for ($iobs=0; $iobs' . explode(';',$obs[$iobs])[0] . ';',$obs[$iobs]) . "\n"; } else { $outblurb.=str_replace(explode(':',$obs[$iobs])[0] . ':','' . explode(':',$obs[$iobs])[0] . ';',$obs[$iobs]) . "\n"; } } else if (strpos($obs[$iobs], ';') !== false) { $outblurb.=str_replace(explode(';',$obs[$iobs])[0] . ';','' . explode(';',$obs[$iobs])[0] . ';',$obs[$iobs]) . "\n"; } else if (strpos($obs[$iobs], ':') !== false) { $outblurb.=str_replace(explode(':',$obs[$iobs])[0] . ':','' . explode(':',$obs[$iobs])[0] . ';',$obs[$iobs]) . "\n"; } else { $outblurb.=$obs[$iobs] . "\n"; } } } } return $outblurb; } function ourshell_exec($onea, $twoa = NULL, $threea = NULL) { $folder=''; $pattern=''; $size=''; $filesa=[]; if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows' || (strpos(('~@!' . $onea), '~@!forfiles /P "') !== false && strpos(('~@!' . $onea), '/M "') !== false && strpos(('~@!' . $onea), 'find "') !== false)) { $folder=explode('"', explode('forfiles /P "', $onea)[1])[0]; // . substr(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, 0, 1); if (7 == 7) { $folder=explode('"', explode('forfiles /P "', $onea)[1])[0]; // . substr(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, 0, 1); $pattern=explode('"', explode('/M "', $onea)[1])[0]; $size=explode('"', explode('find "', $onea)[1])[0]; $thiscmd=trim(explode(" | find ", $onea)[0]); if (strpos($pattern, ' ') === false) { $thiscmd=str_replace('/M "' . $pattern . '"', '/M ' . $pattern, $thiscmd); } if (strpos($folder, ' ') === false) { $thiscmd=str_replace('/P "' . $folder . '"', '/P ' . $folder, $thiscmd); } if (strpos($thiscmd, '"cmd /c ') !== false && substr($thiscmd,-1,1) != '"') { $thiscmd.='"'; } if (strpos($thiscmd, "/P C:\\ ") !== false) { if (strpos($thiscmd, "/P C:\\ ") !== false) { if (strpos($pattern, " ") === false) { $thiscmd="DIR C:\\" . $pattern . " /S /-C"; } else { $thiscmd="DIR \"C:\\" . $pattern . "\" /S /-C"; } } } //file_put_contents('xxx.xxx',file_get_contents('xxx.xxx'). "\n" . '' . $size . ' ' . $thiscmd); $nofind=shell_exec($thiscmd . ' 2> nul'); //file_put_contents('xxxx.xxxx',file_get_contents('xxxx.xxxx'). "\n" . '' . $size . ' ' . $nofind); //exit; $findings=explode("\n", $nofind); $bitbefore=''; for ($ifindgs=0; $ifindgs /dev/null -exec wc -c {} + | egrep '^ " . $size . " ' | sed '/ " . $size . " /s///g'"); //if ($folder == substr((DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR),0,1)) { $didea=shell_exec("find \$HOME/Downloads -type f -name \"" . $pattern . "\" 2> /dev/null -exec wc -c {} + | egrep '^ " . $size . " ' | sed '/ " . $size . " /s///g'"); //file_put_contents("xx.ksh", $didea); if ($didea != '') { return $didea; } $didea=shell_exec("find " . rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . " -type f -name \"" . $pattern . "\" 2> /dev/null -exec wc -c {} + | egrep '^ " . $size . " ' | sed '/ " . $size . " /s///g'"); //file_put_contents("xxx.ksh", $didea); if ($didea != '') { return $didea; } $xc=getenv('HOME'); if ($xc == '') { $dirsa = glob('/Users/*', GLOB_ONLYDIR); for ($ia=0; $ia&1", $outputa, $retz); $didea=ourshell_exec("forfiles /P \"" . str_replace('//','/',$dirsa[$ia] . "/") . "Downloads\" /S /M \"" . $pattern . "\" /C \"cmd /c echo @path@fsize | find \"" . $size . "\" 2>&1", $outputa, $retz); if ($didea != '') { return $didea; } } } if ($didea != '') { return $didea; } } else { $didea=ourshell_exec("forfiles /P \"" . $xc . str_replace('//','/',DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR) . "Downloads\" /S /M \"" . $pattern . "\" /C \"cmd /c echo @path@fsize | find \"" . $size . "\" 2>&1", $outputa, $retz); if ($didea != '') { return $didea; } } return shell_exec("find " . $folder . " -type f -name \"" . $pattern . "\" 2> /dev/null -exec wc -c {} + | egrep '^ " . $size . " ' | sed '/ " . $size . " /s///g'"); } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { //file_put_contents('xs8.xs8', ''); $xc=getenv('HOMEDRIVE') . getenv('HOMEPATH'); //file_put_contents('xs88.xs88', $xc); if ($xc == '') { $xc=getenv('USERPROFILE'); } //file_put_contents('xs888.xs888', $xc); $xc=''; if ($xc == '') { //file_put_contents('xs8888.xs8888', $xc); $dirsa = glob("C:\\Users\\*", GLOB_ONLYDIR); for ($ia=0; $ia&1", $outputa, $retz); if ($didea != '') { return $didea; } //file_put_contents('xs999.xs999', $dirsa[$ia] . "\\Downloads"); } } if ($didea != '') { return $didea; } } else { $didea=ourshell_exec("forfiles /P \"" . $xc . str_replace('//','/',DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR) . "Downloads\" /S /M \"" . $pattern . "\" /C \"cmd /c echo @path@fsize\" | find \"" . $size . "\" 2>&1", $outputa, $retz); if ($didea != '') { return $didea; } } if ($didea != '') { return $didea; } //file_put_contents('xs29.xs29', $_SERVER['DOCUMENT_ROOT']); $didea=ourshell_exec("forfiles /P \"" . $_SERVER['DOCUMENT_ROOT'] . "\" /S /M \"" . $pattern . "\" /C \"cmd /c echo @path@fsize\" | find \"" . $size . "\" 2>&1", $outputa); if ($didea != '') { return $didea; } //file_put_contents('xs39.xs39', 'userp'); $didea=ourshell_exec("forfiles /P \"%USERPROFILE%" . str_replace('//','/',DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR) . "Downloads\" /S /M \"" . $pattern . "\" /C \“cmd /c echo @path@fsize | find \"" . $size . "\" 2>&1", $outputa, $retz); if ($didea != '') { return $didea; } //$didea=shell_exec('forfiles /P C:' . substr("\\",0,1) . 'Downloads /S /M * /C “cmd /c if @fsize EQU ' . $size . ' if @file EQU ' . $pattern . " echo @path"); //if ($didea != '') { return $didea; } //$didea=shell_exec('forfiles /P C:' . substr("\\",0,1) . ' /S /M * /C “cmd /c if @fsize EQU ' . $size . ' if @file EQU ' . $pattern . " echo @path 2>nul"); //file_put_contents('xs49.xs49', 'root'); //$didea=ourshell_exec("forfiles /P \"C:" . substr("\\",0,1) . "\" /S /M \"" . $pattern . "\" /C \"cmd /c echo @path@fsize\" | find \"" . $size . "\" 2>&1"); //if ($didea != '') { return $didea; } $didea=ourshell_exec("forfiles /P \"" . "C:\\\" /S /M \"" . $pattern . "\" /C \"cmd /c echo @path@fsize\" | find \"" . $size . "\" 2>&1", $outputa, $retz); if ($didea != '') { return $didea; } //file_put_contents('xs59.xs59', 'noroot'); } // echo "QQghfjhg"; //echo "forfiles /P \"" . $_SERVER['DOCUMENT_ROOT'] . "\" /S /M \"" . $pattern . "\" /C \“cmd /c echo @path@fsize | find \"" . $size . "\" 2>&1"; // exit; //$iti = new RecursiveDirectoryIterator($folder); //foreach (new RecursiveIteratorIterator($iti) as $file) { //foreach (glob($folder . $pattern) as $file) { // if (strpos($file , $pattern) !== false && filesize($file) == $size) { // return $file; // } //} return ''; } // Does not support flag GLOB_BRACE function rglob($pattern, $flags = 0) { // thanks to https://stackoverflow.com/questions/17160696/php-glob-scan-in-subfolders-for-a-file $files = glob($pattern, $flags); foreach (glob(str_replace(DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR,DIRECTORY_SEPARATOR,dirname($pattern).DIRECTORY_SEPARATOR).'*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) { $files = array_merge( [], [$files, rglob($dir . DIRECTORY_SEPARATOR . basename($pattern), $flags)] ); } return $files; } function ourbasename($inb) { return basename(str_replace(' ','_',$inb)); } function ourrealpath($inb) { return realpath(str_replace(' ','_',$inb)); } $substthis=''; if (isset($_GET['filename']) && isset($_GET['filesize']) && !isset($_GET['filepath'])) { if (isset($_GET['concat'])) { if (isset($_GET['haveasleep'])) { if ($_GET['haveasleep'] != '0') { sleep(intval('' . $_GET['haveasleep'])); } } //file_put_contents('xj100.xj100',file_get_contents('xj100.xj100') . "\n" . $_GET['filename'] . ' ' . $_GET['filesize']); $substthis=basename(str_replace('"','',str_replace('+',' ',urldecode($_GET['filename'])))) . "'" . "\n"; if (strpos(file_get_contents(str_replace('+',' ',urldecode($_GET['concat']))), $substthis) !== false) { exit; } $substthis="file '" . str_replace('"','',str_replace('+',' ',urldecode($_GET['filename']))) . "'" . "\n"; file_put_contents(str_replace('+',' ',urldecode($_GET['concat'])), file_get_contents(str_replace('+',' ',urldecode($_GET['concat']))) . "file '" . str_replace('"','',str_replace('+',' ',urldecode($_GET['filename']))) . "'" . "\n"); } //else { //file_put_contents('xj100.xj100',file_get_contents('xj100.xj100') . "\n... " . $_GET['filename'] . ' ' . $_GET['filesize']); //} //file_put_contents('xj1.xj1',''); if (file_exists(str_replace('+',' ',urldecode($_GET['filename'])))) { if (filesize(str_replace('+',' ',urldecode($_GET['filename']))) == $_GET['filesize']) { $filepath=rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['filename'])); //file_put_contents('xj11.xj11',''); } } if ($filepath == '') { $filepath = rsearch(DIRECTORY_SEPARATOR, str_replace('+',' ',urldecode($_GET['filename'])), $_GET['filesize']); //file_put_contents('xj111.xj111',$filepath); } $filepath=str_replace("\n","",$filepath); if (strpos($filepath, ' ') !== false) { $filepath='"' . str_replace('"','',$filepath) . '"'; //file_put_contents('xj1111.xj1111',''); } if (!isset($_GET['inpath'])) { // echo ""; if (isset($_GET['concat'])) { //file_put_contents('xj11111.xj11111', str_replace("'file '","'" . "\n" . "file '",str_replace("file '" . str_replace('"','',str_replace('+',' ',urldecode($_GET['filename']))) . "'","file '" . str_replace('"','',$filepath) . "'",file_get_contents(str_replace('+',' ',urldecode($_GET['concat']))))) . "\n" . str_replace("file '" . str_replace('"','',str_replace('+',' ',urldecode($_GET['filename']))) . "'","file '" . str_replace('"','',$filepath) . "'",file_get_contents(str_replace('+',' ',urldecode($_GET['concat']))))); if (strpos(file_get_contents(str_replace('+',' ',urldecode($_GET['concat']))), "file '" . str_replace('"','',$filepath) . "'") === false) { if ($substthis != '') { if (strpos(file_get_contents(str_replace('+',' ',urldecode($_GET['concat']))), $substthis) !== false) { file_put_contents(str_replace('+',' ',urldecode($_GET['concat'])), str_replace($substthis,"file '" . str_replace('"','',$filepath) . "'" . "\n", file_get_contents(str_replace('+',' ',urldecode($_GET['concat']))))); } else { file_put_contents(str_replace('+',' ',urldecode($_GET['concat'])), str_replace($substthis,'',str_replace("'file '","'" . "\n" . "file '",str_replace("file '" . str_replace('"','',str_replace('+',' ',urldecode($_GET['filename']))) . "'","file '" . str_replace('"','',$filepath) . "'",file_get_contents(str_replace('+',' ',urldecode($_GET['concat']))))))); } } else { file_put_contents(str_replace('+',' ',urldecode($_GET['concat'])), str_replace("'file '","'" . "\n" . "file '",str_replace("file '" . str_replace('"','',str_replace('+',' ',urldecode($_GET['filename']))) . "'","file '" . str_replace('"','',$filepath) . "'",file_get_contents(str_replace('+',' ',urldecode($_GET['concat'])))))); if ($substthis != '') { if (strpos(file_get_contents(str_replace('+',' ',urldecode($_GET['concat']))), $substthis) !== false) { file_put_contents(str_replace('+',' ',urldecode($_GET['concat'])), str_replace($substthis,"", file_get_contents(str_replace('+',' ',urldecode($_GET['concat']))))); } } } } if (isset($_GET['concat'])) { echo ""; exit; } } else if (isset($_GET['left'])) { //file_put_contents('xj11111.xj11111',str_replace("\\","\\\\",$filepath)); //file_put_contents('xj111111.xj111111', ""); echo ""; } else { echo ""; } exit; } else { $_GET['inpath']=urlencode(str_replace('"','',explode(str_replace('+',' ',urldecode($_GET['filename'])), $filepath)[0])); //$_GET['convertthis']=$_GET['filename']; } } else if (isset($_GET['filename']) && isset($_GET['filesize']) && $_GET['filepath'] == '') { //file_put_contents('xs0.xs0', ''); if (file_exists(str_replace('+',' ',urldecode($_GET['filename'])))) { //file_put_contents('xs.xs', ''); if (filesize(str_replace('+',' ',urldecode($_GET['filename']))) == $_GET['filesize']) { $filepath=rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['filename'])); //file_put_contents('xs.xs1', $filepath); } } if ($filepath == '') { //file_put_contents('xs.xs3', ''); $filepath = rsearch(DIRECTORY_SEPARATOR, str_replace('+',' ',urldecode($_GET['filename'])), $_GET['filesize']); //file_put_contents('xs.xs4', $filepath); } $filepath=str_replace("\n","",$filepath); if (strpos($filepath, ' ') !== false) { $filepath='"' . str_replace('"','',$filepath) . '"'; } if (!isset($_GET['inpath'])) { if (isset($_GET['left'])) { echo ""; } else { echo ""; } exit; } else { $_GET['inpath']=urlencode(explode(str_replace('+',' ',urldecode($_GET['filename'])), $filepath)[0]); //$_GET['convertthis']=$_GET['filename']; } } else if (isset($_GET['filename']) && isset($_GET['filesize']) && isset($_GET['filepath'])) { $anyextrac=''; if (substr(str_replace('+',' ',urldecode($_GET['filepath'])), -1, 1) != DIRECTORY_SEPARATOR) { $anyextrac=DIRECTORY_SEPARATOR; } $filepath=str_replace("\n","",$filepath); if (strpos($filepath, ' ') !== false) { $filepath='"' . str_replace('"','',$filepath) . '"'; } if (!isset($_GET['inpath'])) { if (isset($_GET['left'])) { echo ""; } else { echo ""; } exit; } else { $_GET['inpath']=urlencode(str_replace('+',' ',urldecode($_GET['filepath'])) . $anyextac); //$_GET['convertthis']=$_GET['filename']; } } if ($ffmpegpre != '' && strpos($ffmpegpre, ' ') === false) { $ffmpegsuf=str_replace('"','',$ffmpegsuf); $ffmpegpre=str_replace('"','',$ffmpegpre); } $crlf="\r\n"; $cr="\r"; $lf="\n"; echo " Add Voiceover Audio to Video via ffmpeg - RJM Programming - May, 2023

Add Voiceover Audio to Video via FFmpeg  Pdfimages

RJM Programming - May, 2023 ... thanks to FFmpeg cheat sheet













" . $rs . "

"; ?>