'; return urldecode($_GET['outfile']); } } else if (isset($_POST['outfile'])) { if (urldecode($_POST['outfile']) != "") { $stfle=' '; return urldecode($_POST['outfile']); } } return str_replace(":", "_", $rma); } if (isset($_GET['getme'])) { $om="image/gif"; $ugg=explode("?",explode("#",str_replace("+"," ",urldecode($_GET['getme'])))[0])[0]; $qourext=explode(".",$ugg)[-1 + sizeof(explode(".",$ugg))]; for ($xib=0; $xib

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

"; exit; } $giffilename=server_remote_addr() . ".gif"; 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) { 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 and 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-Lituanian', // 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. ); // 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; $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=""; } } $langrest.=""; $M=$K; } else { if (sizeof($sayps) > 1) { for ($ii=1; $ii" . $thisname . " " . $thisnuance . " " . $thisdefwords . ""; } } $langrest.=""; } } $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"; } 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
   

RJM Programming - July, 2020

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


"; } } else { echo "

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

"; exit; } ?>