'; return urldecode($_GET['outfile']); } } else if (isset($_POST['outfile'])) { if (urldecode($_POST['outfile']) != "") { $stfle=' '; return urldecode($_POST['outfile']); } } return str_replace(":", "_", $rma); } // ffmpeg work via PHP exec conduit to command line ... $ffmpegcommand=""; $ffmpegselect=""; $ffmpegform=""; if (file_exists("/usr/local/bin/ffmpeg")) { $ffmpegcommand="/usr/local/bin/ffmpeg "; $ffmpegselect=" "; $ffmpegform="
"; } else if (file_exists("/usr/bin/ffmpeg")) { $ffmpegcommand="/usr/bin/ffmpeg "; $ffmpegselect=" "; $ffmpegform="
"; } else { shell_exec("ffmpeg -codecs > " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "ffmhuhpeg.huh"); if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ffmhuhpeg.huh")) { $retblurb=file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ffmhuhpeg.huh"); unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ffmhuhpeg.huh"); if (strpos($retblurb, "odecs") !== false) { $ffmpegcommand="ffmpeg "; $ffmpegselect=" "; $ffmpegform="
"; } } else if (file_exists("/usr/local/bin/ffmpeg")) { $ffmpegcommand="/usr/local/bin/ffmpeg "; $ffmpegselect=" "; $ffmpegform="
"; } else if (file_exists("/usr/bin/ffmpeg")) { $ffmpegcommand="/usr/bin/ffmpeg "; $ffmpegselect=" "; $ffmpegform="
"; } } if (isset($_GET['getme'])) { $om="image/gif"; $fbits=""; $ivd=""; $ugg=explode("?",explode("#",str_replace("+"," ",urldecode($_GET['getme'])))[0])[0]; $qourext=explode(".",$ugg)[-1 + sizeof(explode(".",$ugg))]; for ($xib=0; $xib"; } else { echo "

data:" . $om . ";base64," . base64_encode(file_get_contents($fbits . str_replace("+"," ",urldecode($_GET['getme'])))) . "

"; } exit; } $giffilename=server_remote_addr() . ".gif"; if (isset($_GET['getts']) || isset($_POST['getts'])) { $ivd = str_replace("::",":","http://" . $_SERVER['SERVER_NAME'] . ":" . str_replace("~","",str_replace(":443~","",str_replace(":80~","",(":" . $_SERVER['SERVER_PORT'] . "~")))) . "" . str_replace("?" . $_SERVER['QUERY_STRING'], "", str_replace("macos_say_record.php", "", $_SERVER['REQUEST_URI']))); $fbits=str_replace("http://" . explode("/",substr($ivd,7))[0] . "",$_SERVER['DOCUMENT_ROOT'],$ivd . "PHP/animegif/"); if (strpos($ivd, "//localhost:8888/") !== false) { $fbits=str_replace("http://" . explode("/",substr($ivd,7))[0] . "",$_SERVER['DOCUMENT_ROOT'],$ivd . "Htdocs/PHP/animegif/"); } if (!file_exists($fbits . $giffilename)) { echo ""; } else { echo ""; } exit; } if (isset($_GET['audiosize'])) { // if (file_exists('HTTP://www.rjmprogramming.com.au/MarkItUp/html/audio/audio.wav')) { if (isset($_GET['getmecontent'])) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'HTTP://www.rjmprogramming.com.au/MarkItUp/html/audio/audio.wav'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); echo "

" . strlen($output) . "

data:audio/x-wav;base64," . base64_encode($output) . "
"; } else { //$context = stream_context_create(array('http' => array('header'=>'Connection: close\r\n'))); //$ct=file_get_contents('HTTP://www.rjmprogramming.com.au/MarkItUp/html/audio/audio.wav',false,$context); //file_put_contents("x.x",strlen($ct)); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'HTTP://www.rjmprogramming.com.au/MarkItUp/html/audio/audio.wav'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); echo "

" . strlen($output) . "

"; } // } else { // echo "

-1

"; // } exit; } else 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) { if (isset($_GET['exif'])) { $ort=""; //file_put_contents("x5.x5",explode(' ', $lines[$il])[-1 + sizeof(explode(' ', $lines[$il]))]); if (function_exists('exif_read_data')) { $exif = exif_read_data(explode(' ', $lines[$il])[-1 + sizeof(explode(' ', $lines[$il]))]); //file_put_contents("x6.x6",""); if (isset($exif['Orientation'])) { $ort = $exif['Orientation']; } } //file_put_contents("x7.x7",''); echo ''; } else if (isset($_GET['burl'])) { 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; } $hidden="hidden"; $sosw=""; $thwords="Word Suggestion(s) for Voiceover Purposes"; if (PHP_OS == "Darwin") { $hidden="visible"; $sosw="Supervise & synchronize 'say [🌐📖 words]' or "; $thwords="Words"; } $mms="My macOS say"; $aname=""; $precursur=""; $thecontent=""; $tastuff=""; $daudio=""; $audiois=""; $dcv=""; $langrest=""; $htmltop=""; $sayprefix=""; $langsuffix=""; $voicecode=""; $voicesrest=""; $defvoice=""; $retdefvoice=""; $langcode=""; $bestext="aiff"; if (isset($_POST['mediais'])) { $audiois="<" . explode("/",explode("ata:", str_replace(" ","+",urldecode($_POST['mediais'])))[1])[0] . " id=thataudio controls autoplay> 📧
"; $thecontent=str_replace(" ","+",urldecode($_POST['mediais'])); $aname="\n document.getElementById('audioname').value='" . str_replace("+"," ",urldecode($_POST['audioname'])) . "'; \n"; $mms="My media share"; } if (isset($_GET['saythis'])) { $tastuff=str_replace("+"," ",urldecode($_GET['saythis'])); } else if (isset($_GET['saythis'])) { $tastuff=str_replace("+"," ",urldecode($_POST['saythis'])); } $sayvoices="Alex en_US # Most people recognize me by my voice. Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana. Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst. Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne. Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme. Carmit he_IL # שלום. קוראים לי כרמית, ואני קול בשפה העברית. Damayanti id_ID # Halo, nama saya Damayanti. Saya berbahasa Indonesia. Daniel en_GB # Hello, my name is Daniel. I am a British-English voice. Diego es_AR # Hola, me llamo Diego y soy una voz española. Ellen nl_BE # Hallo, mijn naam is Ellen. Ik ben een Belgische stem. Fiona en_scotland # Hello, my name is Fiona. I am a Scottish-English voice. Fred en_US # I sure like being inside this fancy computer Ioana ro_RO # Bună, mă cheamă Ioana . Sunt o voce românească. Joana pt_PT # Olá, chamo-me Joana e dou voz ao português falado em Portugal. Jorge es_ES # Hola, me llamo Jorge y soy una voz española. Juan es_MX # Hola, me llamo Juan y soy una voz mexicana. Kanya th_TH # สวัสดีค่ะ ดิฉันชื่อKanya Karen en_AU # Hello, my name is Karen. I am an Australian-English voice. Kyoko ja_JP # こんにちは、私の名前はKyokoです。日本語の音声をお届けします。 Laura sk_SK # Ahoj. Volám sa Laura . Som hlas v slovenskom jazyku. Lekha hi_IN # नमस्कार, मेरा नाम लेखा है. मैं हिन्दी में बोलने वाली आवाज़ हूँ. Luca it_IT # Salve, mi chiamo Luca e sono una voce italiana. Luciana pt_BR # Olá, o meu nome é Luciana e a minha voz corresponde ao português que é falado no Brasil Maged ar_SA # مرحبًا اسمي Maged. أنا عربي من السعودية. Mariska hu_HU # Üdvözlöm! Mariska vagyok. Én vagyok a magyar hang. Mei-Jia zh_TW # 您好,我叫美佳。我說國語。 Melina el_GR # Γεια σας, ονομάζομαι Melina. Είμαι μια ελληνική φωνή. Milena ru_RU # Здравствуйте, меня зовут Milena. Я – русский голос системы. Moira en_IE # Hello, my name is Moira. I am an Irish-English voice. Monica es_ES # Hola, me llamo Monica y soy una voz española. Nora nb_NO # Hei, jeg heter Nora. Jeg er en norsk stemme. Paulina es_MX # Hola, me llamo Paulina y soy una voz mexicana. Samantha en_US # Hello, my name is Samantha. I am an American-English voice. Sara da_DK # Hej, jeg hedder Sara. Jeg er en dansk stemme. Satu fi_FI # Hei, minun nimeni on Satu. Olen suomalainen ääni. Sin-ji zh_HK # 您好,我叫 Sin-ji。我講廣東話。 Tessa en_ZA # Hello, my name is Tessa. I am a South African-English voice. Thomas fr_FR # Bonjour, je m’appelle Thomas. Je suis une voix française. Ting-Ting zh_CN # 您好,我叫Ting-Ting。我讲中文普通话。 Veena en_IN # Hello, my name is Veena. I am an Indian-English voice. Victoria en_US # Isn't it nice to have a computer that will talk to you? Xander nl_NL # Hallo, mijn naam is Xander. Ik ben een Nederlandse stem. Yelda tr_TR # Merhaba, benim adım Yelda. Ben Türkçe bir sesim. Yuna ko_KR # 안녕하세요. 제 이름은 Yuna입니다. 저는 한국어 음성입니다. Yuri ru_RU # Здравствуйте, меня зовут Yuri. Я – русский голос системы. Zosia pl_PL # Witaj. Mam na imię Zosia, jestem głosem kobiecym dla języka polskiego. Zuzana cs_CZ # Dobrý den, jmenuji se Zuzana. Jsem český hlas. "; // Define default language. $GLOBALS['_DLANG']='en'; // Define all available languages. // WARNING: uncomment all available languages $GLOBALS['_LANG'] = array( 'af-Afrikaans', // afrikaans. 'ar-Arabic', // arabic. 'bg-Bulgarian', // bulgarian. 'ca-Catalan', // catalan. 'cs-Czech', // czech. 'da-Danish', // danish. 'de-German', // german. 'el-Greek', // greek. 'en-English', // english. 'es-Spanish', // spanish. 'et-Estonian', // estonian. 'fi-Finnish', // finnish. 'fr-French', // french. 'gl-Galician', // galician. 'he-Hebrew', // hebrew. 'hi-Hindi', // hindi. 'hr-Croatian', // croatian. 'hu-Hungarian', // hungarian. 'id-Indonesian', // indonesian. 'it-Italian', // italian. 'ja-Japanese', // japanese. 'ko-Korean', // korean. 'ka-Georgian', // georgian. 'lt-Lithuanian', // lithuanian. 'lv-Latvian', // latvian. 'ms-Malay', // malay. 'nl-Dutch', // dutch. 'no-Norwegian', // norwegian. 'pl-Polish', // polish. 'pt-Portuguese', // portuguese. 'ro-Romanian', // romanian. 'ru-Russian', // russian. 'sk-Slovak', // slovak. 'sl-Slovenian', // slovenian. 'sq-Albanian', // albanian. 'sr-Serbian', // serbian. 'sv-Swedish', // swedish. 'th-Thai', // thai. 'tr-Turkish', // turkish. 'uk-Ukrainian', // ukrainian. 'zh-Chinese' // chinese. ); $lri="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $dri=["127462","127463","127464","127465","127466","127467","127468","127469","127470","127471","127472","127473","127474","127475","127476","127477","127478","127479","127480","127481","127482","127483","127484","127485","127486","127487"]; // Detect language from user agent browser ... thanks to https://stackoverflow.com/questions/3770513/detect-browser-language-in-php function lixlpixel_get_env_var($Var) { global $GLOBALS, $langrest; if (empty($GLOBALS[$Var])) { $GLOBALS[$Var]=(!empty($GLOBALS['_SERVER'][$Var]))? $GLOBALS['_SERVER'][$Var] : (!empty($GLOBALS['HTTP_SERVER_VARS'][$Var])) ? $GLOBALS['HTTP_SERVER_VARS'][$Var]:''; } } function lixlpixel_detect_lang($defl) { global $GLOBALS, $langrest, $sayvoices, $voicecode, $voicesrest, $tastuff, $defvoice, $retdefvoice, $lri, $dri; $mappings="gb;en|cz;cs|dk;da|gr;el|il;he;|in;hi;|jp;ja;|kr;ko|ge;ka|al;sq|ua;uk|cn;zh|my;ms|ad;ca|rs;sr|ee;et|sa;ar|za;af|"; $voicesprefix=""; $voicessuffix=""; $selected=" selected"; $M=""; // Detect HTTP_ACCEPT_LANGUAGE & HTTP_USER_AGENT. lixlpixel_get_env_var('HTTP_ACCEPT_LANGUAGE'); lixlpixel_get_env_var('HTTP_USER_AGENT'); $_AL=strtolower($GLOBALS['HTTP_ACCEPT_LANGUAGE']); $_UA=strtolower($GLOBALS['HTTP_USER_AGENT']); if ("$_AL" == "" && "$_UA" == "") { $_AL=strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']); $_UA=strtolower($_SERVER['HTTP_USER_AGENT']); } if ($defl != "") { $_AL=strtolower($defl); $_UA=strtolower($defl); } // Try to detect Primary language if several languages are accepted. foreach ($GLOBALS['_LANG'] as $K) { $sayps=explode(" " . strtolower(explode("-", $K)[0]) . "_", $sayvoices); if (strpos($_AL, explode("-", $K)[0]) === 0) { if (sizeof($sayps) > 1) { for ($ii=1; $ii" . $thisname . " " . $thisnuance . " " . $thisdefwords . ""; if ($defvoice == ($thisnuance . " " . $thisname)) { $tastuff=$thisdefwords; } if ($voicecode == "") { if ($defvoice != "") { $voicecode=$defvoice; } else { $voicecode=$thisnuance . " " . $thisname; $retdefvoice=$thisdefwords; } } $selected=""; } } $pref=" "; // 🇦🇺 $pcc=explode("-", $K)[0]; $pccs=explode(";" . $pcc, $mappings); if (sizeof($pccs) > 1) { $pcc=explode("|", explode(";" . $pcc, $mappings)[0])[-1 + sizeof(explode("|", explode(";" . $pcc, $mappings)[0]))]; } for ($ijk=0; $ijk" . explode("-", $K)[1] . $pref . ""; $M=$K; } else { if (sizeof($sayps) > 1) { for ($ii=1; $ii" . $thisname . " " . $thisnuance . " " . $thisdefwords . ""; } } $pref=" "; // 🇦🇺 $pcc=explode("-", $K)[0]; $pccs=explode(";" . $pcc, $mappings); if (sizeof($pccs) > 1) { $pcc=explode("|", explode(";" . $pcc, $mappings)[0])[-1 + sizeof(explode("|", explode(";" . $pcc, $mappings)[0]))]; } for ($ijk=0; $ijk" . explode("-", $K)[1] . $pref . ""; } } $voicesrest=$voicesprefix . $voicessuffix; if ("$M" != "") { return $M; } // Try to detect any language if not yet detected. foreach ($GLOBALS['_LANG'] as $K) { if (strpos($_AL, explode("-", $K)[0]) !== false) { return $K; } } foreach ($GLOBALS['_LANG'] as $K) { //if(preg_match("/[[( ]{$K}[;,_-)]/",$_UA)) // matching other letters (create an error for seo spyder) return $K; } // Return default language if language is not yet detected. return $GLOBALS['_DLANG']; } function bestis() { global $bestext; $bestext = "aiff"; $ua = strtolower($_SERVER['HTTP_USER_AGENT']); // you can add different browsers with the same way .. if (preg_match('/(chromium)[ \/]([\w.]+)/', $ua)) $bestext = 'm4a'; elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua)) $bestext = 'm4a'; elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua)) $bestext = 'aiff'; elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua)) $bestext = 'm4a'; elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua)) $bestext = 'm4a'; elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua)) $bestext = 'm4a'; return $bestext; } if (isset($_GET['thevoice']) || isset($_POST['thevoice']) || isset($_GET['thelang']) || isset($_POST['thelang'])) { if (isset($_GET['thevoice'])) { $defvoice=str_replace("+"," ",urldecode($_GET['thevoice'])); } else if (isset($_POST['thevoice'])) { $defvoice=str_replace("+"," ",urldecode($_POST['thevoice'])); } if (isset($_GET['thelang'])) { $langcode=urldecode($_GET['thelang']); } else if (isset($_POST['thelang'])) { $langcode=urldecode($_POST['thelang']); } else if (isset($_GET['thevoice'])) { $langcode=explode("_",urldecode($_GET['thevoice']))[0]; } else if (isset($_POST['thevoice'])) { $langcode=explode("_",urldecode($_POSTT['thevoice']))[0]; } $langcode = lixlpixel_detect_lang($langcode); //insert lang var system in a new var for conditional statement $langrest=str_replace(" selected", "", $langrest); if (isset($_GET['thelang'])) { $langcode=urldecode($_GET['thelang']); $langrest=str_replace("'" . $langcode . "'", "'" . $langcode . "' selected", $langrest); } else if (isset($_POST['thelang'])) { $langcode=urldecode($_POST['thelang']); $langrest=str_replace("'" . $langcode . "'", "'" . $langcode . "' selected", $langrest); } else if (isset($_GET['thevoice'])) { $langcode=explode("_",urldecode($_GET['thevoice']))[0]; $langrest=str_replace("'" . $langcode . "'", "'" . $langcode . "' selected", $langrest); } else if (isset($_POST['thevoice'])) { $langcode=explode("_",urldecode($_POSTT['thevoice']))[0]; $langrest=str_replace("'" . $langcode . "'", "'" . $langcode . "' selected", $langrest); } if (isset($_GET['thevoice'])) { $voicesrest=str_replace(" selected", "", $voicesrest); $voicecode=str_replace("+"," ",urldecode($_GET['thevoice'])); $voicesrest=str_replace("'" . $voicecode . "'", "'" . $voicecode . "' selected", $voicesrest); //echo $voicecode . " " . $voicesrest; //exit; $sayprefix=" -v " . trim(explode(" ",$voicecode)[1]) . ""; } else if (isset($_POST['thevoice'])) { $voicesrest=str_replace(" selected", "", $voicesrest); $voicecode=str_replace("+"," ",urldecode($_POST['thevoice'])); $voicesrest=str_replace("'" . $voicecode . "'", "'" . $voicecode . "' selected", $voicesrest); //echo $voicecode . " " . $voicesrest; //exit; $sayprefix=" -v " . trim(explode(" ",$voicecode)[1]) . ""; } } else if (isset($_GET['thelang']) || isset($_POST['thelang'])) { $langcode = lixlpixel_detect_lang($langcode); //insert lang var system in a new var for conditional statement $langrest=str_replace(" selected", "", $langrest); if (isset($_GET['thelang'])) { $langcode=urldecode($_GET['thelang']); $langrest=str_replace("'" . $langcode . "'", "'" . $langcode . "' selected", $langrest); } else { $langcode=urldecode($_POSTT['thelang']); $langrest=str_replace("'" . $langcode . "'", "'" . $langcode . "' selected", $langrest); } } else { // Thanks to // Redirect to the correct location. // Example Implementation aff var lang to name file /* echo 'The Language detected is: '.lixlpixel_detect_lang(); // For Demonstration echo "
"; */ $langcode = lixlpixel_detect_lang($langcode); //insert lang var system in a new var for conditional statement //echo "
"; //echo $lang_var; // print var for trace //echo "
"; //exit; } $sayps=explode(" " . strtolower($langcode) . "_", $sayvoices); if (sizeof($sayps) > 1) { if ($sayprefix == "") { $sayprefix=" -v " . trim(explode("#", $sayps[0])[-1 + sizeof(explode("#", $sayps[0]))]) . ""; } } $langsuffix='thelang=' . urlencode($langcode) . '&thevoice=' . urlencode($voicecode) . '&'; $htmltop=""; //$langchange=" lang='" . urldecode($langcode) . "'>"; if ($tastuff == "" && $retdefvoice != "") { $tastuff=$retdefvoice; } bestis(); if (PHP_OS != "Darwin") { $precursor=" if (two == twotwo) { alert('Sorry ... this only works with an underlying macOS or Mac OS X system that supports the say command.'); return false; } "; } if (PHP_OS == "Darwin" || 1 == 1) { if (isset($_GET['saythis']) && isset($_GET['audioname'])) { if ($_GET['saythis'] != "") { //file_put_contents("xqx.xqx","say -o " . dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_GET['audioname'])) . " " . str_replace("\n",",,,,,,",$thewords) . " > " . dirname(__FILE__) . "/sayout.out" . " 2> " . dirname(__FILE__) . "/sayerr.err"); $thewords=str_replace("+"," ",urldecode($_GET['saythis'])); //file_put_contents("xq.xq","say -o " . dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_GET['audioname'])) . " " . str_replace("\n",",,,,,,",$thewords) . " > " . dirname(__FILE__) . "/sayout.out" . " 2> " . dirname(__FILE__) . "/sayerr.err"); //file_put_contents("xq.xq",$sayprefix . " " . $voicecode . " " . $_POST['thevoice']); //exit; exec("say" . $sayprefix . " -o " . dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_GET['audioname'])) . " " . str_replace("\n",",,,,,,",$thewords) . " > " . dirname(__FILE__) . "/sayout.out" . " 2> " . dirname(__FILE__) . "/sayerr.err"); } } else if (isset($_POST['saythis']) && isset($_POST['audioname'])) { if ($_POST['saythis'] != "") { //file_put_contents("xqqx.xqqx","say -o " . dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_POST['audioname'])) . " " . str_replace("\n",",,,,,,",$thewords) . " > " . dirname(__FILE__) . "/sayout.out" . " 2> " . dirname(__FILE__) . "/sayerr.err"); $thewords=str_replace("+"," ",urldecode($_POST['saythis'])); //echo "say -o " . dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_POST['audioname'])) . " " . str_replace("\n",",,,,,,",$thewords); //exit; //file_put_contents("xqq.xqq","say -o " . dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_POST['audioname'])) . " " . str_replace("\n",",,,,,,",$thewords) . " > " . dirname(__FILE__) . "/sayout.out" . " 2> " . dirname(__FILE__) . "/sayerr.err"); //file_put_contents("xqv.xqv",$sayprefix . " " . $voicecode . " " . $_POST['thevoice']); //echo $sayprefix; //exit; exec("say" . $sayprefix . " -o " . dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_POST['audioname'])) . " " . str_replace("\n",",,,,,,",$thewords) . " > " . dirname(__FILE__) . "/sayout.out" . " 2> " . dirname(__FILE__) . "/sayerr.err"); } } else if (isset($_POST['mediais']) || ((!isset($_GET['saythis']) && !isset($_POST['saythis'])) || !isset($_GET['audioname']) || !isset($_POST['audioname']))) { if (!isset($_POST['mediais'])) { $audiois=""; } if (isset($_GET['audioname'])) { $ourmime="audio/x-aiff"; $ourext=explode(".",str_replace("+"," ",urldecode($_GET['audioname'])))[-1 + sizeof(explode(".",str_replace("+"," ",urldecode($_GET['audioname']))))]; for ($ib=0; $ib 📧
"; $thecontent="data:" . $ourmime . ";base64," . base64_encode(file_get_contents(dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_GET['audioname'])))); $daudio=""; //unlink(dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_GET['audioname']))); } else if (isset($_POST['audioname'])) { $ourmime="audio/x-aiff"; $ourext=explode(".",str_replace("+"," ",urldecode($_POST['audioname'])))[-1 + sizeof(explode(".",str_replace("+"," ",urldecode($_POST['audioname']))))]; for ($ib=0; $ib"; $thecontent="data:" . $ourmime . ";base64," . base64_encode(file_get_contents(dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_POST['audioname'])))); } $daudio=""; //unlink(dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_POST['audioname']))); } if (isset($_GET['saythis'])) { $tastuff=str_replace("+"," ",urldecode($_GET['saythis'])); } else if (isset($_GET['saythis'])) { $tastuff=str_replace("+"," ",urldecode($_POST['saythis'])); } if (isset($_GET['dummysaythis'])) { $dcv=str_replace("\n"," ",str_replace("+"," ",urldecode($_GET['dummysaythis']))); $dcv=str_replace("+"," ",urldecode($_GET['dummysaythis'])); $tastuff=str_replace("+"," ",urldecode($_GET['dummysaythis'])); } else if (isset($_GET['dummysaythis'])) { $dcv=str_replace("\n"," ",str_replace("+"," ",urldecode($_POST['dummysaythis']))); $dcv=str_replace("+"," ",urldecode($_POST['dummysaythis'])); $tastuff=str_replace("+"," ",urldecode($_POST['dummysaythis'])); } $xtastuff=$tastuff; if ($xtastuff == "") { $xtastuff="youllneverfindthis"; } // ffmpeg work via PHP exec conduit to command line ... // Thanks to https://superuser.com/questions/277642/how-to-merge-audio-and-video-file-in-ffmpeg and https://trac.ffmpeg.org/wiki/Concatenate if (isset($_GET['actionis']) || isset($_POST['actionis'])) { // fmpeg ideas with actionis +=/+/++ and m1 and m2 $inmimetype="video/mp4"; $inext="mp4"; $immimetype="video/mp4"; $imext="mp4"; $actc=""; $extraswitch=""; $cmdpref=""; $interimext=$inext; $i1=" -i " . dirname(__FILE__) . DIRECTORY_SEPARATOR; $i2=" -i " . dirname(__FILE__) . DIRECTORY_SEPARATOR; if (isset($_GET['fprefix'])) { $cmdpref=str_replace("+"," ",urldecode($_GET['fprefix'])); } else if (isset($_POST['fprefix'])) { $cmdpref=str_replace("+"," ",urldecode($_POST['fprefix'])); } if (isset($_GET['actionis'])) { $actc=str_replace(" ","+",urldecode($_GET['actionis'])); } else if (isset($_POST['actionis'])) { $actc=str_replace(" ","+",urldecode($_POST['actionis'])); } if ($actc == "+=") { $extraswitch=" -shortest "; } else if ($actc == "++") { $interimext="ts"; } $interimname=" -c copy " . $extraswitch . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture."; if (isset($_GET['m1'])) { $inmimetype=str_replace("video/quicktime","video/mp4",explode(";", explode("ata:", urldecode($_GET['m1']))[1])[0]); $inext=str_replace("mov","mp4",str_replace("x-","",explode("/", $inmimetype)[1])); file_put_contents("audio_capture." . $inext, base64_decode(explode(explode(";", explode("ata:", urldecode($_GET['m1']))[1])[0] . ";base64,",str_replace(" ","+",urldecode($_GET['m1'])))[1] )); $ort=""; if (function_exists('exif_read_data')) { $exif = exif_read_data(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio_capture." . $inext); if (isset($exif['Orientation'])) { $ort = $exif['Orientation']; } } $i1.="audio_capture." . $inext; $interimext=$inext; if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext)) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext); } $outputname="; " . $cmdpref . " -i " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audiocapture."; } else if (isset($_POST['m1'])) { $inmimetype=str_replace("video/quicktime","video/mp4",explode(";", explode("ata:", urldecode($_POST['m1']))[1])[0]); $inext=str_replace("mov","mp4",str_replace("x-","",explode("/", $inmimetype)[1])); file_put_contents("audio_capture." . $inext, base64_decode(explode(explode(";", explode("ata:", urldecode($_POST['m1']))[1])[0] . ";base64,",str_replace(" ","+",urldecode($_POST['m1'])))[1] )); $ort=""; if (function_exists('exif_read_data')) { $exif = exif_read_data(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio_capture." . $inext); if (isset($exif['Orientation'])) { $ort = $exif['Orientation']; } } $i1.="audio_capture." . $inext; $interimext=$inext; if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext)) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext); } $outputname="; " . $cmdpref . " -i " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audiocapture."; } if (isset($_GET['m2'])) { $immimetype=str_replace("video/quicktime","video/mp4",explode(";", explode("ata:", urldecode($_GET['m2']))[1])[0]); $imext=str_replace("mov","mp4",str_replace("x-","",explode("/", $immimetype)[1])); file_put_contents("audio__capture." . $imext, base64_decode(explode(explode(";", explode("ata:", urldecode($_GET['m2']))[1])[0] . ";base64,",str_replace(" ","+",urldecode($_GET['m2'])))[1] )); $i2.="audio__capture." . $imext; $interimext="ts"; if (strpos($inmimetype, "video/") !== false && strpos($immimetype, "audio/") !== false) { $interimext="mkv"; } else if (strpos($immimetype, "video/") !== false && strpos($inmimetype, "audio/") !== false) { $interimext="mkv"; } if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext)) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext); } $outputname="; " . $cmdpref . " -i " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audiocapture."; } else if (isset($_POST['m2'])) { $immimetype=str_replace("video/quicktime","video/mp4",explode(";", explode("ata:", urldecode($_POST['m2']))[1])[0]); $imext=str_replace("mov","mp4",str_replace("x-","",explode("/", $immimetype)[1])); file_put_contents("xx.xx", "audio__capture." . $imext . ' ' . strlen(str_replace(" ","+",urldecode($_POST['m2'])))); file_put_contents("audio__capture." . $imext, base64_decode(explode(explode(";", explode("ata:", urldecode($_POST['m2']))[1])[0] . ";base64,",str_replace(" ","+",urldecode($_POST['m2'])))[1] )); $i2.="audio__capture." . $imext; $interimext="ts"; if (strpos($inmimetype, "video/") !== false && strpos($immimetype, "audio/") !== false) { $interimext="mkv"; } else if (strpos($immimetype, "video/") !== false && strpos($inmimetype, "audio/") !== false) { $interimext="mkv"; } if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext)) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext); } $outputname="; " . $cmdpref . " -i " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio__capture." . $interimext . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audiocapture."; } $omimetype=str_replace("video/quicktime","video/mp4",$inmimetype); $oext=str_replace("mov","mp4",$inext); $ort=""; if (isset($_GET['fprefix']) || isset($_POST['fprefix'])) { if ($actc == "++") { if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio1capture.ts")) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio1capture.ts"); } if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio2capture.ts")) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio2capture.ts"); } if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio_capture.ts")) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio_capture.ts"); } // ffmpeg -i air_drop_messages_live_0photo.mov air_drop_messages_live_0photo.ts // ffmpeg -i air_drop_messages_live_photo.mov air_drop_messages_live_photo.ts $xexec=($cmdpref . $i1 . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio1capture.ts"); $xexec.="; " . ($cmdpref . $i2 . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio2capture.ts"); // ffmpeg -i "concat:air_drop_messages_live_0photo.ts|air_drop_messages_live_photo.ts" -c copy air_drop_messages_live_photo_more.ts $xexec.="; " . ($cmdpref . " -i \"concat:" . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio1capture.ts|" . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio2capture.ts\" -c copy " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio_capture.ts"); // ffmpeg -i air_drop_messages_live_photo_more.ts air_drop_messages_live_photo_more.mp4 //file_put_contents("x.x", $xexec); exec($xexec); if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audiocapture." . $oext)) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audiocapture." . $oext); } exec($cmdpref . " -i " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audio_capture.ts " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "audiocapture." . $oext); } else { // eg. ffmpeg -i video.mp4 -i audio.wav -c copy output.mkv //file_put_contents("x.x", $cmdpref . $i1 . $i2 . $interimname . $interimext . "\n\n\n" . trim(substr($outputname,1) . $oext)); exec($cmdpref . $i1 . $i2 . $interimname . $interimext); if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audiocapture." . $oext)) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "audiocapture." . $oext); } exec(trim(substr($outputname,1) . $oext)); } } echo "" . "'; } \">"; exit; } echo $htmltop . " Voiceover ideas ... Supervise and synchronize 'say [words]' or Flash Player Record or Input audio/* capture

Voiceover 🎥🗣 Ideas

" . $sosw . "Flash Player Record or or 🗄📺
   " . $ffmpegselect . "

RJM Programming - July, 2020

" . $audiois . "
" . $thwords . "Record to


" . $ffmpegform . " "; } } else { echo "

This PHP web application only works with macOS and its 'say [words]' command line Text to Speech and/or Audio functionality.

"; exit; } ?>