Audio/Video/Image Conversions via ffmpeg and/or Image/PDF Conversions via ImageMagick"; $avtypes=""; $types = ["audio/x-m4r","audio/wav","audio/x-wav","audio/x-pn-realaudio","audio/x-mpegurl","audio/x-aiff","audio/mpeg","audio/mid", "audio/basic","audio/ogg","video/x-sgi-movie","video/x-msvideo","video/quicktime","audio/mp3","video/mp4","video/mpeg", "video/x-la-asf","video/ogg","video/webm","audio/mp4", "image/jpeg", "image/jpeg", "image/png", "image/gif", "image/bmp", "image/tif", "text/html", "text/html", "text/html", "text/javascript", "text/css", "text/plain", "text/xml", "text/csv", "application/vnd.ms-word", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/x-php", "application/pdf", "IMAGE/pdf", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.ms-powerpoint", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]; $exts = [".m4r",".wav",".wav",".ram",".m3u",".aiff",".mp3",".rmi", ".snd",".ogg",".movie",".avi",".mov",".mp3",".m4v",".mpeg", ".lsx",".ogv",".webm",".m4a", ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tif", ".htm", ".html", ".htmls", ".js", ".css", ".txt", ".xml", ".csv", ".doc", ".docx", ".php", ".pdf", ".pdf", ".pptx", ".ppt", ".xls", ".xlsx"]; $iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone"); $ipad = strpos($_SERVER['HTTP_USER_AGENT'],"iPad"); $android = strpos($_SERVER['HTTP_USER_AGENT'],"Android"); $blackberry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry"); $ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod"); function jserver_remote_addr($delit) { global $stfle; $rma = $_SERVER['REMOTE_ADDR']; $ua = strtolower($_SERVER['HTTP_USER_AGENT']); // you can add different browsers with the same way .. if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua)) $rma = '000000'.$rma; elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua)) $rma = '00000'.$rma; elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua)) $rma = '0000'.$rma; elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua)) $rma = '000'.$rma; elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua)) $rma = '00'.$rma; elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua)) $rma = '0'.$rma; if ($delit != '') { if (file_exists("PHP/animegif/" . str_replace(":", "_", $rma) . ".php")) { exec("rm -f PHP/animegif/" . str_replace(":", "_", $rma) . ".php; echo '

Blank

' > PHP/animegif/" . str_replace(":", "_", $rma) . ".php"); } } return str_replace(":", "_", $rma); } if (isset($argv)) { // command line $numargs = sizeof($argv); if ($numargs <= 4) { if (PHP_OS == 'WINNT') { echo '$ Input path ( eg. we will take blank to mean ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . ' ) then Audio/Video/Image/PDF Input File(spec) then Output path ( eg. we will take blank to mean ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . ' ) then Audio/Video/Image/PDF Output File Extension below ...' . "\n"; $line = stream_get_line(STDIN, 1024, PHP_EOL); if (str_replace("\n", "", $line) == "") { $line=dirname(__FILE__) . DIRECTORY_SEPARATOR; } $lineinspec = stream_get_line(STDIN, 1024, PHP_EOL); $outline = stream_get_line(STDIN, 1024, PHP_EOL); if (str_replace("\n", "", $outline) == "") { $outline=dirname(__FILE__) . DIRECTORY_SEPARATOR; } $outlineinspec = stream_get_line(STDIN, 1024, PHP_EOL); if (strpos(($outlineinspec . "~"), "htm~") !== false) { $outlineinspec.="l"; } } else { $line = readline('$ Input path ( eg. we will take blank to mean ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . ' ) then Audio/Video/Image/PDF Input File(spec) then Output path ( eg. we will take blank to mean ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . ' ) then Audio/Video/Image/PDF Output File Extension below ...' . "\n"); if (str_replace("\n", "", $line) == "") { $line=dirname(__FILE__) . DIRECTORY_SEPARATOR; } $lineinspec = readline(''); $outline = readline(''); if (str_replace("\n", "", $outline) == "") { $outline=dirname(__FILE__) . DIRECTORY_SEPARATOR; } $outlineinspec = readline(''); if (strpos(($outlineinspec . "~"), "htm~") !== false) { $outlineinspec.="l"; } } $cmdsuff=""; $openers=""; $openersdelim=""; foreach (glob($line . $lineinspec) as $filename) { $outnameis=$outline . str_replace("." . explode(".", basename($filename))[-1 + sizeof(explode(".", basename($filename)))], ".", basename($filename)) . str_replace(".", "", $outlineinspec); if (file_exists($outnameis)) { $sufext="_0"; $iext=0; $rone=""; $rtwo=""; while (file_exists($outnameis . $sufext)) { $iext++; $sufext="_" . $iext; } $rtwo=$outnameis; $rone=$outnameis . $sufext; echo "Renaming " . $outnameis . " to " . $outnameis . $sufext . "\n"; try { rename($outnameis, $outnameis . $sufext); } catch (Exception $e) { echo $e->getMessage() . "\n"; } if (!file_exists($outnameis . $sufext)) { echo "Renaming did not happen." . "\n"; } } if (explode(".",$outlineinspec)[-1 + sizeof(explode(".",$outlineinspec))] == "pdJUNKf") { echo ("php " . $argv[0] . " " . $line . " " . basename($filename) . " " . $outline . " " . $outlineinspec . "\n"); passthru("php " . $argv[0] . " " . $line . " " . basename($filename) . " " . $outline . " " . $outlineinspec); } else { $mimetypeis=""; $videoin=false; for ($jia=0; $jia macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err"); echo ($verb . " " . $switchone . " " . $filename . " " . $switchtwo . " " . $outnameis . $cmdsuff . " < /tmp/macos.yes > macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err \n"); exec($verb . " " . $switchone . " " . $filename . " " . $switchtwo . " " . $outnameis . $cmdsuff . " < /tmp/macos.yes > macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err; cat macos_ffmpeg_convert.err"); //passthru($verb . " " . $switchone . " " . $filename . " " . $switchtwo . " " . $outnameis . $cmdsuff . " < /tmp/macos.yes > macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err"); if (file_exists("macos_ffmpeg_convert.out") && file_exists("macos_ffmpeg_convert.err")) { if (7 == 6 && filesize("macos_ffmpeg_convert.out") == 0 && filesize("macos_ffmpeg_convert.err") != 0) { if ($rone != "" && $rtwo != "") { echo "Renaming " . $rone . " back to " . $rtwo . "\n"; rename($rone, $rtwo); } echo "\n\n" . file_get_contents("macos_ffmpeg_convert.err") . "\n\n"; } } if (PHP_OS == "Darwin") { // && explode(".",$outlineinspec)[-1 + sizeof(explode(".",$outlineinspec))] != "pdf") { if (file_exists($outnameis)) { $openers.=$openersdelim . "open " . $outnameis; $openersdelim=" ; "; } } } } if (PHP_OS == "Darwin" && $openers != "") { echo "\n\nWill try to open successful (or old resurrected) files in 8 seconds ...\n"; sleep(8); echo ($openers . " \n"); exec($openers); } //echo "do the work"; } else { $openers=""; $openersdelim=""; $line=trim($argv[1]); if (str_replace("\n", "", $line) == "") { $line=dirname(__FILE__) . DIRECTORY_SEPARATOR; } $lineinspec=$argv[2]; $outline=trim($argv[3]); if (str_replace("\n", "", $outline) == "") { $outline=dirname(__FILE__) . DIRECTORY_SEPARATOR; } $outlineinspec=$argv[4]; $cmdsuff=""; foreach (glob($line . $lineinspec) as $filename) { $outnameis=$outline . str_replace("." . explode(".", basename($filename))[-1 + sizeof(explode(".", basename($filename)))], ".", basename($filename)) . str_replace(".", "", $outlineinspec); if (file_exists($outnameis)) { $sufext="_0"; $iext=0; $rone=""; $rtwo=""; while (file_exists($outnameis . $sufext)) { $iext++; $sufext="_" . $iext; } $rtwo=$outnameis; $rone=$outnameis . $sufext; echo "Renaming " . $outnameis . " to " . $outnameis . $sufext . "\n"; rename($outnameis, $outnameis . $sufext); } $mimetypeis=""; $videoin=false; for ($jia=0; $jia macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err"); echo ($verb . " " . $switchone . " " . $filename . " " . $switchtwo . " " . $outnameis . $cmdsuff . " < /tmp/macos.yes > macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err \n"); exec($verb . " " . $switchone . " " . $filename . " " . $switchtwo . " " . $outnameis . $cmdsuff . " < /tmp/macos.yes > macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err; cat macos_ffmpeg_convert.err"); //passthru($verb . " " . $switchone . " " . $filename . " " . $switchtwo . " " . $outnameis . $cmdsuff . " < /tmp/macos.yes > macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err"); if (file_exists("macos_ffmpeg_convert.out") && file_exists("macos_ffmpeg_convert.err")) { if (8 == 9 && filesize("macos_ffmpeg_convert.out") == 0 && filesize("macos_ffmpeg_convert.err") != 0) { if ($rone != "" && $rtwo != "") { echo "Renaming " . $rone . " back to " . $rtwo . "\n"; rename($rone, $rtwo); } echo "\n\n" . file_get_contents("macos_ffmpeg_convert.err") . "\n\n"; } } if (PHP_OS == "Darwin") { // && explode(".",$outlineinspec)[-1 + sizeof(explode(".",$outlineinspec))] != "pdf") { if (file_exists($outnameis)) { $openers.=$openersdelim . "open " . $outnameis; $openersdelim=" ; "; } } } if (PHP_OS == "Darwin" && $openers != "") { echo "\n\nWill try to open successful (or old resurrected) files in 8 seconds ...\n"; sleep(8); echo ($openers . " \n"); exec($openers); } //echo "Do the work "; } exit; } if (strpos($_SERVER['SERVER_NAME'], "rjmprogramming.com.au") !== false) { if ($iphone || $ipad || $android || $ipod || $blackberry) { // thanks to http://www.phpmysqlscript.com/2012/03/detecting-users-screen-size-and.html $cself=" 🤳 "; $cvse="Email 📧"; $divinfront=""; } else { $cvse="Email"; $divinfront=""; } $title="Email off your Media Conversion Attachment Input Files for Your Inhouse Media Converter to Listen For and Convert"; $onl=""; } if (isset($_POST['to']) && isset($_POST['subject']) && isset($_POST['body'])) { $tow=str_replace("+"," ",urldecode($_POST['to'])); if (strpos($tow, "@") !== false) { $subjw=str_replace('*','m4v',str_replace("+"," ",urldecode($_POST['subject']))); $orign=basename(explode(" ", $subjw)[0]); $thenn=basename(explode(" ", $subjw)[-1 + sizeof(explode(" ", $subjw))]); $bodyn=str_replace(" ","+",urldecode($_POST['body'])); if (strpos($bodyn, "data:") !== false) { file_put_contents($thenn, base64_decode(explode(";base64,", $bodyn)[1])); } else { file_put_contents($thenn, $bodyn); } if (1 == 1) { // thanks to https://community.hpe.com/t5/general/use-of-sendmail-and-uuencode/td-p/2431436#.XxqPtvgzZZo //$cmd="/usr/sbin/sendmail " . $tow . " << END\nSubject: " . $subjw . "\n`uuencode " . $thenn . " " . $thenn . "`\nEND"; //$cmd="/usr/sbin/sendmail " . $tow . " << END\nSubject: " . $subjw . "\nFrom: rjmprogr@vs-rmetcalfe.au.syrahost.com\n`uuencode " . $thenn . " " . $thenn . "`\nEND"; $cmd="/usr/sbin/sendmail " . $tow . " << END\nSubject: " . $subjw . "\n`uuencode " . $thenn . " " . $thenn . "`\nEND"; //file_put_contents("00x.00x", $cmd); exec($cmd); exec("rm -f " . $thenn); } else { //file_put_contents("0x.0x", "uuencode " . $thenn . " " . $thenn . " > " . explode(".", $thenn)[0] . "; cat " . explode(".", $thenn)[0] . " | /usr/sbin/sendmail " . $tow . "; rm -f " . explode(".", $thenn)[0] . "; rm -f " . $thenn); //exec("uuencode " . $thenn . " " . $thenn . " > " . explode(".", $thenn)[0] . "; cat " . explode(".", $thenn)[0] . " | /usr/sbin/sendmail " . $tow . " > smail.out 2> smail.err; rm -f " . explode(".", $thenn)[0] . "; rm -f " . $thenn); exec("uuencode " . $thenn . " " . $thenn . " > " . explode(".", $thenn)[0] . "; cat " . explode(".", $thenn)[0] . " | /usr/sbin/sendmail " . $tow . " > smail.out 2> smail.err; rm -f " . explode(".", $thenn)[0] . "; rm -f " . $thenn); } } exit; } if (isset($_GET['globit'])) { $accf=""; $accfd=""; $accfout=""; $accfoutext=".m4v"; $pprefix=dirname(__FILE__) . DIRECTORY_SEPARATOR; if (isset($_GET['globpath'])) { if (str_replace("+", " ", urldecode($_GET['globpath'])) != "") { $pprefix=str_replace("+", " ", urldecode($_GET['globpath'])); } } if (isset($_GET['globext'])) { $accfoutext="." . str_replace(".", "", str_replace("+", " ", urldecode($_GET['globext']))); } foreach (glob($pprefix . str_replace("+", " ", urldecode($_GET['globit']))) as $filename) { $accf.=$accfd . basename($filename); $accfout.=$accfd . explode(".", basename($filename))[0] . $accfoutext; $accfd=","; } echo "" . $title . ""; exit; } for ($iav=0; $iavConvert to " . strtoupper(substr($types[$iav],0,1)) . str_replace("/"," ",substr($types[$iav],1)) . ""; } } } function nosourcei($inh) { global $verb; if (strpos(strtolower($inh), "","",str_replace(">","",str_replace(" controls>","", str_replace(" src="," data=", str_replace("image/pdf","application/pdf", str_replace("IMAGE","image", $inh)))))))))); return str_replace("ffmpeg","imagemagick",str_replace("","",str_replace(">","",str_replace(" controls>","", str_replace("image/pdf","application/pdf", str_replace(" src="," data=", str_replace("IMAGE","image", $inh))))))))); } else { $vfrom="ffmpeg"; if (strpos($verb, "ffmpeg") !== false) { $vfrom="youwillneverfindthis"; } //file_put_contents("xx.xx",str_replace("ffmpeg","imagemagick",str_replace("","",str_replace(">","",str_replace(" controls>","",$inh))))))); return str_replace($vfrom,"imagemagick",str_replace("","",str_replace(" controls>","",$inh))))); } } return $inh; } function ourstr_replace($fris, $tois, $stris) { global $indx; if (strpos($stris, ",") !== false || ($indx == 0 && ($_GET['inpath'] || $_POST['inpath']))) { $interim=str_replace($fris, $tois, explode(",",$stris)[$indx]); if (isset($_GET['inpath'])) { if (strpos($interim, str_replace("+"," ",urldecode($_GET['inpath']))) === false) { return str_replace("+"," ",urldecode($_GET['inpath'])) . $interim; } } else if (isset($_POST['inpath'])) { if (strpos($interim, str_replace("+"," ",urldecode($_POST['inpath']))) === false) { return str_replace("+"," ",urldecode($_POST['inpath'])) . $interim; } } return $interim; //} else if (strpos($stris, " ") !== false || ($indx == 0 && ($_GET['inpath'] || $_POST['inpath']))) { //} else if (strpos($stris, " -i ") !== false || ($indx == 0 && ($_GET['inpath'] || $_POST['inpath']))) { } return str_replace($fris, $tois, $stris); } function yourstr_replace($fris, $tois, $stris) { global $indx; if (strpos($stris, ",") !== false || ($indx == 0 && ($_GET['outpath'] || $_POST['outpath']))) { $interim=str_replace($fris, $tois, explode(",",$stris)[$indx]); if (isset($_GET['outpath'])) { return str_replace("+"," ",urldecode($_GET['outpath'])) . $interim; } else if (isset($_POST['outpath'])) { return str_replace("+"," ",urldecode($_POST['outpath'])) . $interim; } return $interim; } return str_replace($fris, $tois, $stris); } if (isset($_GET['vsfs']) && isset($_GET['vsfn']) && isset($_GET['vsfi']) && isset($_GET['vsfu'])) { $docroot=dirname(__FILE__); if (file_exists("lookup_" . str_replace(")","",str_replace("(","",str_replace("+"," ",urldecode($_GET['vsfn'])))))) { unlink("lookup_" . str_replace(")","",str_replace("(","",str_replace("+"," ",urldecode($_GET['vsfn']))))); } exec("find " . $_SERVER['DOCUMENT_ROOT'] . " -name '" . str_replace(")","*",str_replace("(","*",str_replace("+"," ",urldecode($_GET['vsfn'])))) . "' -exec ls -l {} \\; 2> /dev/null > lookup_" . str_replace(")","",str_replace("(","",str_replace("+"," ",urldecode($_GET['vsfn']))))); if (file_exists("lookup_" . str_replace(")","",str_replace("(","",str_replace("+"," ",urldecode($_GET['vsfn'])))))) { $infois=file_get_contents(("lookup_" . str_replace(")","",str_replace("(","",str_replace("+"," ",urldecode($_GET['vsfn'])))))); $lines=explode("\n", $infois); for ($il=0; $il'); if (strpos(explode(" ", $lines[$il])[-1 + sizeof( explode(" ", $lines[$il]))], $_SERVER['DOCUMENT_ROOT']) !== false) { //file_put_contents("x7.x7",''); if (isset($_GET['turl'])) { echo "'; } //else { //echo ''; //} } //else if (isset($_GET['turl'])) { //echo ''; //} else { // echo ''; //} unlink("lookup_" . str_replace(")","",str_replace("(","",str_replace("+"," ",urldecode($_GET['vsfn']))))); } else { unlink("lookup_" . str_replace(")","",str_replace("(","",str_replace("+"," ",urldecode($_GET['vsfn']))))); } } } exit; } //if (PHP_OS == "Darwin" || $verb != "textutil" || isset($_GET['emailanyway'])) { if (PHP_OS == "Darwin" || isset($_GET['emailanyway']) || $iphone || $ipad || $android || $ipod || $blackberry) { if (isset($_GET['convertthis']) && isset($_GET['outputname'])) { exec("echo y > /tmp/macos.yes"); if ($_GET['convertthis'] != "") { $cvtt=str_replace("+", " ", urldecode($_GET['convertthis'])); $inph=""; if (isset($_GET['inpath']) && strpos($cvtt, "http") === false) { $inph=str_replace("+", " ", urldecode($_GET['inpath'])); if ($inph != "" && strpos($cvtt, " -i ") !== false) { $cvtt='"' . $inph . str_replace(" -i ", "\" -i \"" . $inph, $cvtt) . '"'; } else if ($inph != "" && strpos($cvtt, ",") !== false) { $cvtt='"' . $inph . str_replace(",", "\",\"" . $inph, $cvtt) . '"'; } else if ($inph != "" && strpos($cvtt, " ") !== false) { $cvtt='"' . $inph . str_replace(" ", "\" \"" . $inph, $cvtt) . '"'; } } //} $thewords=str_replace("+"," ",$cvtt); $thegoes=explode(",", $thewords); for ($indx=0; $indx macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err \n"); //file_put_contents("x.x",$verb . " " . $switchone . " " . ourstr_replace("+"," ",$thewords) . " " . $switchtwo . " " . yourstr_replace("+"," ",urldecode($_GET['outputname'])) . $cmdsuff . " < /tmp/macos.yes > macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err; cat macos_ffmpeg_convert.err"); exec($verb . " " . $switchone . " " . ourstr_replace("+"," ",$thewords) . " " . $switchtwo . " " . yourstr_replace("+"," ",urldecode($_GET['outputname'])) . $cmdsuff . " < /tmp/macos.yes > macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err; cat macos_ffmpeg_convert.err"); //passthru($verb . " " . $switchone . " " . ourstr_replace("+"," ",$thewords) . " " . $switchtwo . " " . yourstr_replace("+"," ",urldecode($_GET['outputname'])) . $cmdsuff . " < /tmp/macos.yes > macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err"); $thecontent=""; if ($mimetypeis != "") { $thecontent=nosourcei("" . ourstr_replace("+"," ",$thewords) . " to " . yourstr_replace("+"," ",urldecode($_GET['outputname'])) . " via ffmpeg ...

" . ourstr_replace("+"," ",$thewords) . " to " . yourstr_replace("+"," ",urldecode($_GET['outputname'])) . " via ffmpeg ...

<" . explode("/",$mimetypeis)[0] . " controls>"); } if ($thecontent != "") { echo $thecontent; exit; } if (7 == 7 || explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname'])))[-1 + sizeof(explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname']))))] == "pdf") { $PDFfilename=yourstr_replace("+"," ",urldecode($_GET['outputname'])); $pdf = file_get_contents($PDFfilename); header('Content-Type: application/pdf'); header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . strlen($pdf)); header('Content-Disposition: inline; filename="' . basename($PDFfilename) .'";'); ob_clean(); flush(); echo $pdf; //exit; } else if (explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname'])))[-1 + sizeof(explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname']))))] == "rtf") { $PDFfilename=yourstr_replace("+"," ",urldecode($_GET['outputname'])); $pdf = file_get_contents($PDFfilename); header('Content-Type: application/rtf'); header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . strlen($pdf)); header('Content-Disposition: inline; filename="' . basename($PDFfilename) .'";'); ob_clean(); flush(); echo $pdf; //exit; } else if (explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname'])))[-1 + sizeof(explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname']))))] == "odt") { $PDFfilename=yourstr_replace("+"," ",urldecode($_GET['outputname'])); $pdf = file_get_contents($PDFfilename); header('Content-Type: application/odt'); header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . strlen($pdf)); header('Content-Disposition: inline; filename="' . basename($PDFfilename) .'";'); ob_clean(); flush(); echo $pdf; //exit; } if (file_exists("macos_ffmpeg_convert.out") && file_exists("macos_ffmpeg_convert.err")) { if (filesize("macos_ffmpeg_convert.out") == 0 && filesize("macos_ffmpeg_convert.err") != 0) { if (6 == 7 && $rone != "" && $rtwo != "") { rename($rone, $rtwo); } //if (explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname'])))[-1 + sizeof(explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname']))))] == 'html') { //echo file_get_contents(ourstr_replace("+"," ",$thewords) . " " . $switchtwo . " " . yourstr_replace("+"," ",urldecode($_GET['outputname']))); //} else { if (file_exists(yourstr_replace("+"," ",urldecode($_GET['outputname']))) && explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname'])))[-1 + sizeof(explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname']))))] == 'html') { echo file_get_contents(yourstr_replace("+"," ",urldecode($_GET['outputname']))); } else { echo "

" . file_get_contents("macos_ffmpeg_convert.err") . "

"; } } else { if (explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname'])))[-1 + sizeof(explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname']))))] == 'html') { echo file_get_contents(yourstr_replace("+"," ",urldecode($_GET['outputname']))); } else { echo explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname'])))[-1 + sizeof(explode(".",yourstr_replace("+"," ",urldecode($_GET['outputname']))))]; } } } } exit; } } else if (isset($_POST['convertthis']) && isset($_POST['outputname'])) { exec("echo y > /tmp/macos.yes"); if ($_POST['convertthis'] != "") { $thewords=str_replace("+"," ",urldecode($_POST['convertthis'])); $thegoes=explode(",", $thewords); //file_put_contents("xxxx.xxxx", $_POST['convertthis'] . " ... " . $_POST['outputname']); for ($indx=0; $indx macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err; cat macos_ffmpeg_convert.err"); //passthru($verb . " " . $switchone . " " . ourstr_replace("+"," ",$thewords) . " " . $switchtwo . " " . yourstr_replace("+"," ",urldecode($_POST['outputname'])) . $cmdsuff . " < /tmp/macos.yes > macos_ffmpeg_convert.out 2> macos_ffmpeg_convert.err"); $thecontent=""; if ($mimetypeis != "") { $thecontent=nosourcei("" . ourstr_replace("+"," ",$thewords) . " to " . yourstr_replace("+"," ",urldecode($_POST['outputname'])) . " via ffmpeg ...

" . ourstr_replace("+"," ",$thewords) . " to " . yourstr_replace("+"," ",urldecode($_POST['outputname'])) . " via ffmpeg ...

<" . explode("/",$mimetypeis)[0] . " controls>"); } if ($thecontent != "") { echo $thecontent; exit; } if (9 == 9 || explode(".",yourstr_replace("+"," ",urldecode($_POST['outputname'])))[-1 + sizeof(explode(".",yourstr_replace("+"," ",urldecode($_POST['outputname']))))] == "pdf") { $PDFfilename=yourstr_replace("+"," ",urldecode($_POST['outputname'])); $pdf = file_get_contents($PDFfilename); header('Content-Type: application/pdf'); header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . strlen($pdf)); header('Content-Disposition: inline; filename="' . basename($PDFfilename) .'";'); ob_clean(); flush(); echo $pdf; //exit; } else if (explode(".",yourstr_replace("+"," ",urldecode($_POST['outputname'])))[-1 + sizeof(explode(".",yourstr_replace("+"," ",urldecode($_POST['outputname']))))] == "rtf") { $PDFfilename=yourstr_replace("+"," ",urldecode($_POST['outputname'])); $pdf = file_get_contents($PDFfilename); header('Content-Type: application/rtf'); header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . strlen($pdf)); header('Content-Disposition: inline; filename="' . basename($PDFfilename) .'";'); ob_clean(); flush(); echo $pdf; //exit; } else if (explode(".",yourstr_replace("+"," ",urldecode($_POST['outputname'])))[-1 + sizeof(explode(".",yourstr_replace("+"," ",urldecode($_POST['outputname']))))] == "odt") { $PDFfilename=yourstr_replace("+"," ",urldecode($_POST['outputname'])); $pdf = file_get_contents($PDFfilename); header('Content-Type: application/odt'); header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . strlen($pdf)); header('Content-Disposition: inline; filename="' . basename($PDFfilename) .'";'); ob_clean(); flush(); echo $pdf; //exit; } if (file_exists("macos_ffmpeg_convert.out") && file_exists("macos_ffmpeg_convert.err")) { if (3 == 6 && filesize("macos_ffmpeg_convert.out") == 0 && filesize("macos_ffmpeg_convert.err") != 0) { if ($rone != "" && $rtwo != "") { rename($rone, $rtwo); } echo "

" . file_get_contents("macos_ffmpeg_convert.err") . "

"; } } } exit; } } else if ((!isset($_GET['convertthis']) && !isset($_POST['convertthis'])) || !isset($_GET['outputname']) || !isset($_POST['outputname'])) { exec("echo y > /tmp/macos.yes"); $outfileis=""; if (isset($_GET['outputname'])) { //file_put_contents("xxx.xxx", $_SERVER['QUERY_STRING']); $extis=explode(".",str_replace("+"," ",urldecode($_GET['outputname'])))[-1 + sizeof(explode(".",str_replace("+"," ",urldecode($_GET['outputname']))))]; $mimetypeis=""; $videoin=false; for ($jia=0; $jia" . yourstr_replace("+"," ",urldecode($_GET['outputname'])) . " via ffmpeg ...<" . explode("/",$mimetypeis)[0] . " controls>"); } else if (strtolower("~" . $extis, "~pdf") !== false) { // thanks to https://stackoverflow.com/questions/12730581/use-this-php-code-to-open-a-pdf-in-a-new-tab if (1 == 2) { $PDFfilename=str_replace("+"," ",urldecode($_GET['outputname'])); $pdf = file_get_contents($PDFfilename); header('Content-Type: application/pdf'); header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . strlen($pdf)); header('Content-Disposition: inline; filename="' . basename($PDFfilename) .'";'); ob_clean(); flush(); echo $pdf; } exit; } else if (strtolower("~" . $extis, "~rtf") !== false) { // thanks to https://stackoverflow.com/questions/12730581/use-this-php-code-to-open-a-pdf-in-a-new-tab if (1 == 1) { $PDFfilename=str_replace("+"," ",urldecode($_GET['outputname'])); $pdf = file_get_contents($PDFfilename); header('Content-Type: application/rtf'); header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . strlen($pdf)); header('Content-Disposition: inline; filename="' . basename($PDFfilename) .'";'); ob_clean(); flush(); echo $pdf; } exit; } else { //echo explode(".",str_replace("+"," ",urldecode($_GET['outputname'])))[-1 + sizeof(explode(".",str_replace("+"," ",urldecode($_GET['outputname']))))]; //exit; header('Content-type: application/' . explode(".",str_replace("+"," ",urldecode($_GET['outputname'])))[-1 + sizeof(explode(".",str_replace("+"," ",urldecode($_GET['outputname']))))]); echo file_get_contents(str_replace("+"," ",urldecode($_GET['outputname']))); exit; } } } else if (isset($_POST['outputname'])) { exec("echo y > /tmp/macos.yes"); $extis=explode(".",str_replace("+"," ",urldecode($_POST['outputname'])))[-1 + sizeof(explode(".",str_replace("+"," ",urldecode($_POST['outputname']))))]; $mimetypeis=""; $videoin=false; for ($jia=0; $jia" . yourstr_replace("+"," ",urldecode($_GET['outputname'])) . " via ffmpeg ...<" . explode("/",$mimetypeis)[0] . " controls>"); } else if (strtolower("~" . $extis, "~pdf") !== false) { // thanks to https://stackoverflow.com/questions/12730581/use-this-php-code-to-open-a-pdf-in-a-new-tab if (1 == 2) { $PDFfilename=str_replace("+"," ",urldecode($_POST['outputname'])); $pdf = file_get_contents($PDFfilename); header('Content-Type: application/pdf'); header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . strlen($pdf)); header('Content-Disposition: inline; filename="' . basename($PDFfilename) .'";'); ob_clean(); flush(); echo $pdf; } exit; } else if (strtolower("~" . $extis, "~rtf") !== false) { // thanks to https://stackoverflow.com/questions/12730581/use-this-php-code-to-open-a-pdf-in-a-new-tab if (1 == 1) { $PDFfilename=str_replace("+"," ",urldecode($_POST['outputname'])); $pdf = file_get_contents($PDFfilename); header('Content-Type: application/rtf'); header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1 header('Pragma: public'); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . strlen($pdf)); header('Content-Disposition: inline; filename="' . basename($PDFfilename) .'";'); ob_clean(); flush(); echo $pdf; } exit; } else { //echo explode(".",str_replace("+"," ",urldecode($_POST['outputname'])))[-1 + sizeof(explode(".",str_replace("+"," ",urldecode($_POST['outputname']))))]; //exit; header('Content-type: application/' . explode(".",str_replace("+"," ",urldecode($_POST['outputname'])))[-1 + sizeof(explode(".",str_replace("+"," ",urldecode($_POST['outputname']))))]); echo file_get_contents(str_replace("+"," ",urldecode($_POST['outputname']))); exit; } } } echo " " . $title . "

Supervise ffmpeg Audio/Video or Image/PDF ImageMagick Conversions

RJM Programming - July, 2020

" . $outfileis . "
Input Audio/Video/Image/PDF File(s)    

     ... or" . $cself . " ... 
" . $divinfront . "

" . $thecontent . "
"; } } else { echo "Email off your Audio/Video/Image/PDF Conversion Attachment Input Files for Your Inhouse Audio/Video/Image/PDF Converter to Listen For and Convert

This PHP web application only works with ffmpeg (Audio/Video) and/or ImageMagick (Image/PDF). Perhaps consider getting a local Apache/PHP/MySql web server such as MAMP or you have an email listener and will Email and Download to that emailee to do the conversions

"; exit; } ?>