5) { //file_put_contents('xxx04.xxx01', $cis . ' vs ' . sys_get_temp_dir()); if (sys_get_temp_dir() == substr($huhs[5], 0, strlen(sys_get_temp_dir()))) { //file_put_contents('xxx05.xxx01', $cis); if (PHP_OS == "Darwin") { //file_put_contents('xxx06.xxx01', $cis); putenv('PATH=/usr/local/bin'); exec(explode(';',$cis)[0] . ' 2> pdfunite.bad'); //file_put_contents('xxx07.xxx01', $cis); } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { exec(explode(';', $cis)[0] . ' 2> pdfunite.bad'); } } } } exit; } if (isset($_POST['rmzip'])) { $cis=str_replace('+',' ',urldecode($_POST['rmzip'])); $precis=explode('-', $cis)[0]; sleep(120); $xx='' . rand(456, 78534432); if (file_exists($cis) && strpos(($cis . $xx . '~'), '.zip' . $xx . '~') !== false && strpos($cis, '-') !== false) { if (file_exists($precis . '.mp4') && trim($precis) != '') { unlink($precis . '.mp4'); } if (file_exists($precis . '.gif') && trim($precis) != '') { unlink($precis . '.gif'); } if (file_exists($precis . '.pdf') && trim($precis) != '') { unlink($precis . '.pdf'); } unlink($cis); } exit; } if (isset($_GET['inurl'])) { $mt="image"; $mprefix=''; if (strtolower($outext) == 'pdf') { sleep(3); echo "" . str_replace('+',' ',basename($filename)) . ""; } else { echo "" . str_replace('+',' ',basename($filename)) . ""; } } exit; } else if (isset($_GET['nopdfurl'])) { sleep(37); foreach (glob('pdfcopy-0-local-' . '*.pdf') as $filename) { try { unlink($filename); } catch (Exception $werty) { } } foreach (glob('pdfcopy-0-local-*' . DIRECTORY_SEPARATOR . '*.pdf') as $filename) { try { unlink($filename); } catch (Exception $werty) { } try { rmdir(explode(basename($filename), $filename)[0]); } catch (Exception $werty) { } } exit; } $pdfprotocol='file://'; function oururlencode($whata) { global $pdfprotocol, $dn; if (strpos('~' . strtolower($whata), '~http') !== false) { return str_replace(urlencode(DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR, urlencode($whata)); } $newwhata=str_replace($_SERVER['DOCUMENT_ROOT'], "http://" . $_SERVER['SERVER_NAME'] . "" . str_replace("~","",str_replace(":443~","",str_replace(":80~","",(":" . $_SERVER['SERVER_PORT'] . "~")))), $whata); if ($newwhata == $whata || 1 == 1) { //file_put_contents('xaa.xaa', 'whata=' . $whata . ' and retval=' . urlencode($whata) . ' versus ' . str_replace(urlencode(DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR, urlencode($whata))); if (1 == 1) { $pdfprotocol='file://'; $pdfprotocol='./'; return 'php_calls_pdfimages.php?inurl=' . 'file://' . str_replace(urlencode(DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR, urlencode($whata)); } else { $pdfprotocol='file://'; return str_replace(urlencode(DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR, urlencode($whata)); //return urlencode($whata); } } $pdfprotocol=explode($_SERVER['SERVER_NAME'], $newwhata)[0]; return str_replace(urlencode(DIRECTORY_SEPARATOR), '/', str_replace(urlencode('/'), '/', urlencode(explode($pdfprotocol, $newwhata)[1]))); } function ourtouch($fp1, $fp2) { if (file_exists($fp1)) { file_put_contents($fp1, file_get_contents($fp1) . ' '); //file_put_contents('xx0.xx0', file_get_contents($fp1)); return filesize($fp1); } return ''; } function ourunlink($what) { global $followupwhat, $olmore, $dn; $huhpis=explode('.', $what); foreach (glob($huhpis[0] . '-*') as $filename) { try { if (strpos($filename, '.zip') !== false && $followupwhat == '') { // && (isset($_GET['pdfbighp']) || isset($_POST['pdfbighp']))) { $followupwhat=$filename; $olmore=" parent.rmzipit('" . $followupwhat . "'); "; } else if (strpos($filename, '.zip') !== false) { // && (isset($_GET['pdfbighp']) || isset($_POST['pdfbighp']))) { $followupwhat=$filename; } else { unlink($filename); } } catch (Exception $werty) { } } if (isset($_GET['pdfbighp'])) { if (file_exists(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['pdfbighp'])))) { foreach (glob(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['pdfbighp'])) . DIRECTORY_SEPARATOR . '*.*') as $filename) { try { unlink($filename); } catch (Exception $werty) { } } exec('rmdir ' . rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['pdfbighp']))); } } else if (isset($_POST['pdfbighp'])) { if (file_exists(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['pdfbighp'])))) { foreach (glob(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['pdfbighp'])) . DIRECTORY_SEPARATOR . '*.*') as $filename) { try { unlink($filename); } catch (Exception $werty) { } } exec('rmdir ' . rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['pdfbighp']))); } } unlink($what); } $pdfh=''; $pdfbigh=''; $defdef=''; $autoplay=''; $fextra=''; $infile='"input_pdf.pdf"'; $pathp='.' . DIRECTORY_SEPARATOR; if (isset($_GET['inpath'])) { if (trim(str_replace('+',' ',urldecode($_GET['inpath']))) != '') { $pathp=str_replace('+',' ',urldecode($_GET['inpath'])); if (substr(strrev($pathp),0,1) != DIRECTORY_SEPARATOR) { $pathp.=DIRECTORY_SEPARATOR; } } } else if (isset($_POST['inpath'])) { if (trim(str_replace('+',' ',urldecode($_POST['inpath']))) != '') { $pathp=str_replace('+',' ',urldecode($_POST['inpath'])); if (substr(strrev($pathp),0,1) != DIRECTORY_SEPARATOR) { $pathp.=DIRECTORY_SEPARATOR; } } } if (isset($_GET['convertthis'])) { $cbi=' '; $infile='"' . $pathp . str_replace('+',' ',urldecode($_GET['convertthis'])) . '"'; $fextra=' ' . basename(str_replace('"','',$infile)) . ''; //file_put_contents('xa.xa', $fextra); } else if (isset($_POST['convertthis'])) { $cbi=' '; $infile='"' . $pathp . str_replace('+',' ',urldecode($_POST['convertthis'])) . '"'; $fextra=' ' . basename(str_replace('"','',$infile)) . ''; //file_put_contents('xa2.xa2', $fextra); } $olstuff=''; $comparep=''; $comparev=''; $comparea=''; $komparep=''; $komparev=''; $komparea=''; if (isset($_POST['dela']) && !isset($_POST['touch'])) { if (file_exists(basename(str_replace('+',' ', urldecode($_POST['dela']))))) { $comparea=date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['dela']))))); $komparea=filesize(basename(str_replace('+',' ', urldecode($_POST['dela'])))); } } if (isset($_POST['delv']) && !isset($_POST['touch'])) { $_GET['delv']='video.bad'; //if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delv']))))) { // $comparev=date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['delv']))))); // $komparev=filesize(basename(str_replace('+',' ', urldecode($_POST['delv'])))); //} if (file_exists(basename(str_replace('+',' ', urldecode($_GET['delv']))))) { $comparev=date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_GET['delv']))))); $komparev=filesize(basename(str_replace('+',' ', urldecode($_GET['delv'])))); } } if (isset($_POST['delp']) && !isset($_POST['touch'])) { if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delp']))))) { $comparep=date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['delp']))))); $komparep=filesize(basename(str_replace('+',' ', urldecode($_POST['delp'])))); } } if (isset($_POST['delh']) && !isset($_POST['touch'])) { if (file_exists('pdftohtml.bad')) { $comparep=date("F d Y H:i:s.", filemtime('pdftohtml.bad')); $komparep=filesize('pdftohtml.bad'); } } if (isset($_POST['delx']) && !isset($_POST['touch'])) { if (file_exists('pdftoxml.bad')) { $comparep=date("F d Y H:i:s.", filemtime('pdftoxml.bad')); $komparep=filesize('pdftoxml.bad'); } } if (isset($_POST['delv'])) { if ($_POST['delv'] != '') { $_GET['delv']='video.bad'; if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delv']))))) { if (strpos(strtolower(str_replace('+',' ', urldecode($_POST['delv'])) . "?"), ".mp4?") !== false) { if (isset($_POST['touch'])) { //file_put_contents('xx0.xx0', 'y'); if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delv']))))) { if (PHP_OS == "Darwin" || 1 == 1) { //file_put_contents('xx1.xx1', filesize(basename(str_replace('+',' ', urldecode($_GET['delv'])))) . '/' . date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_GET['delv']))))) . ' '); //$time = time()+15000; $xx=ourtouch(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . basename(str_replace('+',' ', urldecode($_GET['delv']))), null); //exec("touch " . basename(str_replace('+',' ', urldecode($_POST['delv'])))); //sleep(3); //file_put_contents('xx1.xx1', file_get_contents('xx1.xx1') . ' ' . $xx . ' ' . filesize(basename(str_replace('+',' ', urldecode($_GET['delv'])))) . '/' .date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_GET['delv']))))) . ' '); if (!isset($_POST['delp']) && !isset($_POST['dela']) && !isset($_POST['delh']) && !isset($_POST['delx'])) { exit; } } else { if (!isset($_POST['delp']) && !isset($_POST['dela']) && !isset($_POST['delh']) && !isset($_POST['delx'])) { exit; } } } } else { //$comparev=''; //if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delv']))))) { // $comparev=date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['delv']))))); //} sleep(20); if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delv']))))) { if ($comparev == 'HUH' || ($komparev == filesize(basename(str_replace('+',' ', urldecode($_GET['delv'])))) && $comparev == date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_GET['delv']))))))) { //file_put_contents('xxx1.xxx1', $comparev); ourunlink(basename(str_replace('+',' ', urldecode($_POST['delv'])))); $olstuff.=" if (parent.document.getElementById('vemail')) { parent.document.getElementById('vemail').style.display='none'; } if (parent.document.getElementById('vsms')) { parent.document.getElementById('vsms').style.display='none'; } "; } } } } } if (!isset($_POST['delp']) && !isset($_POST['dela']) && !isset($_POST['delh']) && !isset($_POST['delx'])) { if ($olstuff != '') { echo ""; } exit; } } } if (isset($_POST['dela'])) { if ($_POST['dela'] != '') { if (file_exists(basename(str_replace('+',' ', urldecode($_POST['dela']))))) { if (strpos(strtolower(str_replace('+',' ', urldecode($_POST['dela'])) . "?"), ".gif?") !== false) { if (isset($_POST['touch'])) { //file_put_contents('xx2.xx2', 'y'); if (file_exists(basename(str_replace('+',' ', urldecode($_POST['dela']))))) { if (PHP_OS == "Darwin" || 1 == 1) { //file_put_contents('xx3.xx3', 'y'); $time = time()+15000; touch(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . basename(str_replace('+',' ', urldecode($_POST['dela']))), null); //exec("touch " . basename(str_replace('+',' ', urldecode($_POST['dela'])))); if (!isset($_POST['delp']) && !isset($_POST['delh']) && !isset($_POST['delx'])) { exit; } } else { if (!isset($_POST['delp']) && !isset($_POST['delh']) && !isset($_POST['delx'])) { exit; } } } } else { //$comparea=''; //if (file_exists(basename(str_replace('+',' ', urldecode($_POST['dela']))))) { // $comparea=date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['dela']))))); //} sleep(20); if (file_exists(basename(str_replace('+',' ', urldecode($_POST['dela']))))) { if ($comparea == 'HUH' || $comparea == date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['dela'])))))) { //file_put_contents('xxx3.xxx3', $comparea); ourunlink(basename(str_replace('+',' ', urldecode($_POST['dela'])))); $olstuff.=" if (parent.document.getElementById('aemail')) { parent.document.getElementById('aemail').style.display='none'; } if (parent.document.getElementById('asms')) { parent.document.getElementById('asms').style.display='none'; } "; } } } } } if (!isset($_POST['delp'])) { if ($olstuff != '') { echo ""; } exit; } } } if (isset($_POST['delp'])) { if ($_POST['delp'] != '') { if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delp']))))) { if (strpos(strtolower(str_replace('+',' ', urldecode($_POST['delp'])) . "?"), ".pdf?") !== false) { if (isset($_POST['touch'])) { //file_put_contents('xx4.xx4', 'y'); if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delp']))))) { if (PHP_OS == "Darwin" || 1 == 1) { //file_put_contents('xx5.xx5', 'y'); $time = time()+15000; touch(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . basename(str_replace('+',' ', urldecode($_POST['delp']))), null); //exec("touch " . basename(str_replace('+',' ', urldecode($_POST['delp'])))); if (!isset($_POST['delh']) && !isset($_POST['delx'])) { exit; } } else { if (!isset($_POST['delh']) && !isset($_POST['delx'])) { exit; } } } } else { //$comparep=''; //if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delp']))))) { // $comparep=date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['delp']))))); //} sleep(20); if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delp']))))) { if ($comparep == 'HUH' || $comparep == date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['delp'])))))) { //file_put_contents('xxx5.xxx5', $comparep); ourunlink(basename(str_replace('+',' ', urldecode($_POST['delp'])))); $olstuff.=" if (parent.document.getElementById('pemail')) { parent.document.getElementById('pemail').style.display='none'; } if (parent.document.getElementById('psms')) { parent.document.getElementById('psms').style.display='none'; } "; } } } } } if ($olstuff != '') { echo ""; } exit; } } if (isset($_POST['delh'])) { if ($_POST['delh'] != '') { $_POST['delh']='pdftohtml.bad'; if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delh']))))) { if (strpos(strtolower(str_replace('+',' ', urldecode($_POST['delh'])) . "?"), ".pdf?") !== false) { if (isset($_POST['touch'])) { //file_put_contents('xx4.xx4', 'y'); if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delh']))))) { if (PHP_OS == "Darwin" || 1 == 1) { //file_put_contents('xx5.xx5', 'y'); $time = time()+15000; touch(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . basename(str_replace('+',' ', urldecode($_POST['delh']))), null); //exec("touch " . basename(str_replace('+',' ', urldecode($_POST['delh'])))); if (!isset($_POST['delx'])) { exit; } } else { if (!isset($_POST['delx'])) { exit; } } } } else { //$comparep=''; //if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delh']))))) { // $comparep=date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['delh']))))); //} sleep(20); if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delh']))))) { if ($comparep == 'HUH' || $comparep == date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['delh'])))))) { //file_put_contents('xxx5.xxx5', $comparep); ourunlink(basename(str_replace('+',' ', urldecode($_POST['delh'])))); $olstuff.=" if (parent.document.getElementById('hemail')) { parent.document.getElementById('hemail').style.display='none'; } if (parent.document.getElementById('hsms')) { parent.document.getElementById('hsms').style.display='none'; } "; } } } } } if ($olstuff != '') { echo ""; } exit; } } if (isset($_POST['delx'])) { if ($_POST['delx'] != '') { $_POST['delx']='pdftoxml.bad'; if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delx']))))) { if (strpos(strtolower(str_replace('+',' ', urldecode($_POST['delx'])) . "?"), ".pdf?") !== false) { if (isset($_POST['touch'])) { //file_put_contents('xx4.xx4', 'y'); if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delx']))))) { if (PHP_OS == "Darwin" || 1 == 1) { //file_put_contents('xx5.xx5', 'y'); $time = time()+15000; touch(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . basename(str_replace('+',' ', urldecode($_POST['delx']))), null); //exec("touch " . basename(str_replace('+',' ', urldecode($_POST['delx'])))); if (1 == 1) { exit; } } else { if (1 == 1) { exit; } } } } else { //$comparep=''; //if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delx']))))) { // $comparep=date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['delx']))))); //} sleep(20); if (file_exists(basename(str_replace('+',' ', urldecode($_POST['delx']))))) { if ($comparep == 'HUH' || $comparep == date("F d Y H:i:s.", filemtime(basename(str_replace('+',' ', urldecode($_POST['delx'])))))) { //file_put_contents('xxx5.xxx5', $comparep); ourunlink(basename(str_replace('+',' ', urldecode($_POST['delx'])))); $olstuff.=" if (parent.document.getElementById('xemail')) { parent.document.getElementById('xemail').style.display='none'; } if (parent.document.getElementById('xsms')) { parent.document.getElementById('xsms').style.display='none'; } "; } } } } } if ($olstuff != '') { echo ""; } exit; } } $vsw=0; $vw=720; $vh=540; $dovideo=false; $doag=false; $dopdf=false; $dohtml=false; $doxml=false; $sparepdf=""; if (isset($_GET['dovideo']) || isset($_POST['dovideo'])) { $dovideo=true; } if (isset($_GET['doag']) || isset($_POST['doag'])) { $doag=true; } if (isset($_GET['dopdf']) || isset($_POST['dopdf'])) { $dopdf=true; } if (isset($_GET['dohtml']) || isset($_POST['dohtml'])) { $dohtml=true; } if (isset($_GET['doxml']) || isset($_POST['doxml'])) { $doxml=true; } $vsw=0; $vw=720; $vh=540; if (isset($_GET['sw'])) { $vsw=intval($_GET['sw']); $vh=(540 * (720 / ($vsw * 0.46))); $vw=($vsw * 0.46); $vh=explode(".", "$vh")[0]; $vh /= 2; $vh=explode(".", "$vh")[0]; $vh *= 2; $vh=explode(".", "$vh")[0]; $vw=explode(".", "$vw")[0]; $vw /= 2; $vw=explode(".", "$vw")[0]; $vw *= 2; $vh=intval("$vh"); $vw=intval("$vw"); //echo $vh . ',' . $vw . ' via ' . $vsw; //exit; } else if (isset($_POST['sw'])) { $vsw=intval($_POST['sw']); $vh=(540 * (720 / ($vsw * 0.46))); $vw=($vsw * 0.46); $vh=explode(".", "$vh")[0]; $vh /= 2; $vh=explode(".", "$vh")[0]; $vh *= 2; $vh=explode(".", "$vh")[0]; $vw=explode(".", "$vw")[0]; $vw /= 2; $vw=explode(".", "$vw")[0]; $vw *= 2; $vh=intval("$vh"); $vw=intval("$vw"); //echo $vh . ',' . $vw . ' via ' . $vsw; //exit; } if (isset($_GET['install'])) { if ($_GET['install'] == 'pdfimages') { if (PHP_OS == "Darwin") { putenv('PATH=/usr/local/bin'); $x="

Regarding ...

brew install popper

If errors below, you should try command above, yourself, on command line ...


"; $x.=shell_exec('brew install poppler 2> huh.jnk'); if (file_exists('huhjunk.jnk')) { $x.=file_get_contents('huhjnk.jnk'); unlink('huh.jnk'); } echo "

" . $x . "
"; } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $x="

Regarding ...

sudo apt-get update
sudo apt-get install poppler-utils

If errors below, you should try commands above, yourself, on command line ...


"; $x.=shell_exec('sudo apt-get update'); $x.=shell_exec('sudo apt-get install poppler-utils'); echo "

" . $x . "
"; } } else if ($_GET['install'] == 'ffmpeg') { if (PHP_OS == "Darwin") { putenv('PATH=/usr/local/bin'); $x="

Regarding ...

brew install ffmpeg

If errors below, you should try command above, yourself, on command line ...


"; $x.=shell_exec('brew install ffmpeg 2> huh.jnk'); if (file_exists('huhjunk.jnk')) { $x.=file_get_contents('huhjnk.jnk'); unlink('huh.jnk'); } echo "

" . $x . "
"; } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $x="

Regarding ...

sudo apt update -y
sudo apt install ffmpeg -y

If errors below, you should try commands above, yourself, on command line ...


"; $x.=shell_exec('sudo apt update -y'); $x.=shell_exec('sudo apt install ffmpeg -y'); echo "

" . $x . "
"; } } else if ($_GET['install'] == 'imagemagick') { if (PHP_OS == "Darwin") { putenv('PATH=/usr/local/bin'); $x="

Regarding ...

brew install imagemagick

If errors below, you should try command above, yourself, on command line ...


"; $x.=shell_exec('brew install imagemagick 2> huh.jnk'); if (file_exists('huhjunk.jnk')) { $x.=file_get_contents('huhjnk.jnk'); unlink('huh.jnk'); } echo "

" . $x . "
"; } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $x="

Regarding ...

sudo apt update
sudo apt install imagemagick

If errors below, you should try commands above, yourself, on command line ...


"; $x.=shell_exec('sudo apt update'); $x.=shell_exec('sudo apt install imagemagick'); echo "

" . $x . "
"; } } exit; } if (isset($_POST['install'])) { if ($_POST['install'] == 'pdfimages') { if (PHP_OS == "Darwin") { putenv('PATH=/usr/local/bin'); $x="

Regarding ...

brew install popper

If errors below, you should try command above, yourself, on command line ...


"; $x.=shell_exec('brew install poppler 2> huh.jnk'); if (file_exists('huhjunk.jnk')) { $x.=file_get_contents('huhjnk.jnk'); unlink('huh.jnk'); } echo "

" . $x . "
"; } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $x="

Regarding ...

sudo apt-get update
sudo apt-get install poppler-utils

If errors below, you should try commands above, yourself, on command line ...


"; $x.=shell_exec('sudo apt-get update'); $x.=shell_exec('sudo apt-get install poppler-utils'); echo "

" . $x . "
"; } } else if ($_POST['install'] == 'ffmpeg') { if (PHP_OS == "Darwin") { putenv('PATH=/usr/local/bin'); $x="

Regarding ...

brew install ffmpeg

If errors below, you should try command above, yourself, on command line ...


"; $x.=shell_exec('brew install ffmpeg 2> huh.jnk'); if (file_exists('huhjunk.jnk')) { $x.=file_get_contents('huhjnk.jnk'); unlink('huh.jnk'); } echo "

" . $x . "
"; } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $x="

Regarding ...

sudo apt update -y
sudo apt install ffmpeg -y

If errors below, you should try commands above, yourself, on command line ...


"; $x.=shell_exec('sudo apt update -y'); $x.=shell_exec('sudo apt install ffmpeg -y'); echo "

" . $x . "
"; } } else if ($_POST['install'] == 'imagemagick') { if (PHP_OS == "Darwin") { putenv('PATH=/usr/local/bin'); $x="

Regarding ...

brew install imagemagick

If errors below, you should try command above, yourself, on command line ...


"; $x.=shell_exec('brew install imagemagick 2> huh.jnk'); if (file_exists('huhjunk.jnk')) { $x.=file_get_contents('huhjnk.jnk'); unlink('huh.jnk'); } echo "

" . $x . "
"; } else if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $x="

Regarding ...

sudo apt update
sudo apt install imagemagick

If errors below, you should try commands above, yourself, on command line ...


"; $x.=shell_exec('sudo apt update'); $x.=shell_exec('sudo apt install imagemagick'); echo "

" . $x . "
"; } } exit; } $filepath=''; $rest=""; $restfrom=""; $restto="









... or ...








 Video Animated GIF Image PDF HTML XML

"; function rsearch($folder, $pattern, $size) { // thanks, anyway, to https://stackoverflow.com/questions/17160696/php-glob-scan-in-subfolders-for-a-file $didea=''; if (PHP_OS == "Darwin") { //file_put_contents("x.ksh", "find " . $folder . " -type f -name \"" . $pattern . "\" 2> /dev/null -exec wc -c {} + | egrep '^ " . $size . " ' | sed '/ " . $size . " /s///g'"); if ($folder == DIRECTORY_SEPARATOR) { $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; } } 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') { $didea=shell_exec('forfiles /P ' . $_SERVER['DOCUMENT_ROOT'] . ' /S /M * /C “cmd /c if @fsize EQU ' . $size . ' if @file EQU ' . $pattern . " echo @path 2>nul"); 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"); if ($didea != '') { return $didea; } } //$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 ''; } if (isset($_GET['filename']) && isset($_GET['filesize']) && !isset($_GET['filepath'])) { 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'])); } } if ($filepath == '') { $filepath = rsearch(DIRECTORY_SEPARATOR, str_replace('+',' ',urldecode($_GET['filename'])), $_GET['filesize']); } echo ""; exit; } else if (isset($_GET['filename']) && isset($_GET['filesize']) && $_GET['filepath'] == '') { 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'])); } } if ($filepath == '') { $filepath = rsearch(DIRECTORY_SEPARATOR, str_replace('+',' ',urldecode($_GET['filename'])), $_GET['filesize']); } echo ""; exit; } 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; } echo ""; exit; } $outp='ideas'; if (isset($_GET['outprefix'])) { $outp=str_replace('+',' ',urldecode($_GET['outprefix'])); if (trim($outp) == "") { $outp='ideas'; } } else if (isset($_POST['outprefix'])) { $outp=str_replace('+',' ',urldecode($_POST['outprefix'])); if (trim($outp) == "") { $outp='ideas'; } } $bigp=''; if (PHP_OS == "Darwin") { $bigp='/usr/local/bin/'; } if ($dohtml) { if (isset($_GET['dohtml']) && isset($_GET['pdfbighp'])) { if (!is_dir(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['pdfbighp'])))) { mkdir(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['pdfbighp']))); } $pdfh='pdftohtml -c ' . $infile . ' ' . rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['pdfbighp'])) . DIRECTORY_SEPARATOR . "index 2> pdftohtml.bad ; "; $pdfbigh=$bigp . $pdfh; } else if (isset($_POST['dohtml']) && isset($_POST['pdfbighp'])) { if (!is_dir(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['pdfbighp'])))) { mkdir(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['pdfbighp']))); } $pdfh='pdftohtml -c ' . $infile . ' ' . rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['pdfbighp'])) . DIRECTORY_SEPARATOR . "index 2> pdftohtml.bad ; "; $pdfbigh=$bigp . $pdfh; } } if ($doxml) { if (isset($_GET['doxml']) && isset($_GET['pdfbighp'])) { if (!is_dir(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['pdfbighp'])))) { mkdir(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['pdfbighp']))); } $pdfh.='pdftohtml -c -xml ' . $infile . ' ' . rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['pdfbighp'])) . DIRECTORY_SEPARATOR . $outp . " 2> pdftoxml.bad ;"; $pdfbigh.=$bigp . 'pdftohtml -c -xml ' . $infile . ' ' . rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['pdfbighp'])) . DIRECTORY_SEPARATOR . $outp . " 2> pdftoxml.bad ;"; } else if (isset($_POST['doxml']) && isset($_POST['pdfbighp'])) { if (!is_dir(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['pdfbighp'])))) { mkdir(rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['pdfbighp']))); } $pdfh.='pdftohtml -c -xml ' . $infile . ' ' . rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['pdfbighp'])) . DIRECTORY_SEPARATOR . $outp . " 2> pdftoxml.bad ;"; $pdfbigh.=$bigp . 'pdftohtml -c -xml ' . $infile . ' ' . rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_POST['pdfbighp'])) . DIRECTORY_SEPARATOR . $outp . " 2> pdftoxml.bad ;"; } } $origoutp=$outp; $hashbit=""; $olhashbit=""; if ($outp != strtoupper($outp)) { if ($doag && $dovideo) { $autoplay=' autoplay'; $hashbit=" + '#" . strtoupper($outp) . ".mp4#" . strtoupper($outp) . ".gif'"; } else if ($dovideo) { $autoplay=' autoplay'; $hashbit=" + '#" . strtoupper($outp) . ".mp4'"; } else if ($doag) { $hashbit=" + '#" . strtoupper($outp) . ".gif'"; } if ($dohtml) { if ($hashbit == '') { $hashbit=" + '#" . strtoupper($outp) . ".html'"; } else { $hashbit.=" + '#" . strtoupper($outp) . ".html'"; } } if ($doxml) { if ($hashbit == '') { $hashbit=" + '#" . strtoupper($outp) . ".xml'"; } else { $hashbit.=" + '#" . strtoupper($outp) . ".xml'"; } } } else { $defdef=' '; } if (!$dopdf && $hashbit != '' && $outp != strtoupper($outp)) { $olhashbit=''; } else if ($dopdf && $hashbit != '' && $outp != strtoupper($outp)) { $olhashbit=''; } else if ($dopdf && $hashbit == '' && $outp != strtoupper($outp)) { $olhashbit=''; } $outp=strtoupper($outp); $proposedtable=" var outpaths=[], outnames=[]; var bo='3px dashed orange'; var boo=null; var ourwording='&wording=Pdfimages%20images%2E%20'; var ajdone=false; var dmode='ltor'; var lastpath='', lastfilename=''; var gfirstparam=false, gsecondparam='', defem='" . $defdef . "', defs='" . $defdef . "', gblurb=''; var zf=''; function rmzipit(zwhat) { zf=zwhat; var zhr = new XMLHttpRequest(); var zform=new FormData(); zform.append('rmzip', zf); zhr.open('post', document.URL.split('?')[0].split('#')[0], true); zhr.send(zform); } function booit() { if (bo.indexOf(' orange') != -1) { bo=bo.replace(' orange', ' red'); document.getElementById('mysbut').style.border=bo; //boo.style.border=bo; } else { bo=bo.replace(' red', ' orange'); document.getElementById('mysbut').style.border=bo; //boo.style.border=bo; } setTimeout(booit, 3000); } function woit(ioo) { var wo=null; if (ioo.src.indexOf('data:') == 0) { wo=window.open('', '_blank'); wo.document.write(''); wo.document.title=ioo.title; } else { window.open(ioo.src, '_blank'); } } function appit(cbthis) { //alert(cbthis.getAttribute('data-append')); commandit(cbthis.getAttribute('data-append')); outpaths=[]; outnames=[]; document.getElementById('thewords').value=cbthis.getAttribute('data-append').split('" . DIRECTORY_SEPARATOR . "')[eval(-1 + cbthis.getAttribute('data-append').split('" . DIRECTORY_SEPARATOR . "').length)].replace(String.fromCharCode(34),''); document.getElementById('path').value=cbthis.getAttribute('data-append').split(String.fromCharCode(34))[5].split(document.getElementById('thewords').value)[0]; cbthis.checked=false; cbthis.style.display='none'; document.getElementById('sappend').innerHTML=''; } function checkf() { var bcols=['#0000ff','#00ff00','#ff0000','#ffff00','#ff00ff','#00ffff','#777777','#000077','#007700','#770000','#777700','#770077','#007777']; var bids=['vemail', 'vsms', 'aemail', 'asms', 'pemail', 'psms', 'hemail', 'hsms', 'hemail', 'hsms']; if (document.getElementById('justputpdffilename')) { if (document.getElementById('justputpdffilename').innerHTML.toLowerCase().indexOf('.pdf') != -1) { document.getElementById('justputpdffilename').title=document.getElementById('justputpdffilename').innerHTML; document.getElementById('justputpdffilename').innerHTML=''; if (document.getElementById('thewords').value.trim() == '' || document.getElementById('thewords').value == lastfilename) { document.getElementById('thewords').value=document.getElementById('justputpdffilename').title; if (document.getElementById('cbi') && document.getElementById('justputpdffilesize').innerHTML.trim() != document.getElementById('justputpdffilesize').innerHTML) { document.getElementById('cbi').style.height='252px'; } lastfilename=document.getElementById('justputpdffilename').title; outnames.push(lastfilename); } if (document.getElementById('justputpdfpath').innerHTML == '' && document.getElementById('justputpdfpath').title == '') { if (document.getElementById('justputpdffilesize').innerHTML != '') { //alert('am going away to look for filename=' + lastfilename + ' of size ' + document.getElementById('justputpdffilesize').innerHTML.trim()); document.getElementById('justputpdfpath').title=' '; //var xx=prompt(document.URL.split('?')[0].split('#')[0] + '?filepath=&filesize=' + document.getElementById('justputpdffilesize').innerHTML.trim() + '&filename=' + encodeURIComponent(lastfilename), document.URL.split('?')[0].split('#')[0] + '?filepath=&filesize=' + document.getElementById('justputpdffilesize').innerHTML.trim() + '&filename=' + encodeURIComponent(lastfilename)); document.getElementById('path').style.cursor='progress'; lastpath=''; document.getElementById('gifif').src='./php_calls_pdfimages.php?filepath=&filesize=' + document.getElementById('justputpdffilesize').innerHTML.trim() + '&filename=' + encodeURIComponent(lastfilename); } } } else if (document.getElementById('justputpdffilename').innerHTML != '') { document.getElementById('justputpdffilename').innerHTML=''; document.getElementById('justputpdffilesize').innerHTML=''; } if (document.getElementById('justputpdfpath').innerHTML != '') { document.getElementById('justputpdfpath').title=document.getElementById('justputpdfpath').innerHTML; document.getElementById('justputpdfpath').innerHTML=''; if (document.getElementById('justputpdfpath').title.indexOf('/') != -1) { if (document.getElementById('justputpdfpath').title.slice(-1) != '/') { document.getElementById('justputpdfpath').title+='/'; } } else { if (document.getElementById('justputpdfpath').title.slice(-1) != String.fromCharCode(92)) { document.getElementById('justputpdfpath').title+=String.fromCharCode(92); } } if (document.getElementById('path').value.trim() == '' || document.getElementById('path').value == lastpath) { document.getElementById('path').value=document.getElementById('justputpdfpath').title; lastpath=document.getElementById('justputpdfpath').title; outpaths.push(lastpath); if (eval('' + outnames.length) > 1 && eval('' + outpaths.length) > 1) { //alert('okay'); document.getElementById('sappend').innerHTML=' ... versus \"' + '" . sys_get_temp_dir() . DIRECTORY_SEPARATOR . "' + outnames[eval(-2 + outnames.length)].split('.')[0] + outnames[eval(-1 + outnames.length)].split('.')[0] + '.pdf\"'; } } else if (document.getElementById('path').value.trim() != '') { //alert('oops'); } } if (document.getElementById('path').value != '') { if (lastpath == '') { //alert('okaY'); lastpath=''; lastpath=document.getElementById('path').value; outpaths.push(lastpath); if (eval('' + outnames.length) > 1 && eval('' + outpaths.length) > 1) { //alert('okay'); document.getElementById('sappend').innerHTML=' ... versus \"' + '" . sys_get_temp_dir() . DIRECTORY_SEPARATOR . "' + outnames[eval(-2 + outnames.length)].split('.')[0] + outnames[eval(-1 + outnames.length)].split('.')[0] + '.pdf\"'; } lastpath=' '; } document.getElementById('path').style.cursor='pointer'; } } for (var ii=0; ii