gfdg nhffd

"; //exit;= // // convert -delay 500 http://www.rjmprogramming.com.au/filename_00__1-1.jpg http://www.rjmprogramming.com.au/filename_00__1-2.jpg http://www.rjmprogramming.com.au/filename_00__1-3.jpg http://www.rjmprogramming.com.au/filename_00__1-4.jpg http://www.rjmprogramming.com.au/filename_00__1-5.jpg video.gif // ffmpeg -i video.gif -c:v libx264 -preset veryslow -qp 0 output.mp4 // class RPDF extends FPDF { // thanks to http://www.fpdf.org/en/script/script31.php function TextWithDirection($x, $y, $txt, $direction='R') { if ($direction=='R') $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',1,0,0,1,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); elseif ($direction=='L') $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',-1,0,0,-1,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); elseif ($direction=='U') $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',0,1,-1,0,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); elseif ($direction=='D') $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',0,-1,1,0,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); else $s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); if ($this->ColorFlag) $s='q '.$this->TextColor.' '.$s.' Q'; $this->_out($s); } function TextWithRotation($x, $y, $txt, $txt_angle, $font_angle=0) { $font_angle+=90+$txt_angle; $txt_angle*=M_PI/180; $font_angle*=M_PI/180; $txt_dx=cos($txt_angle); $txt_dy=sin($txt_angle); $font_dx=cos($font_angle); $font_dy=sin($font_angle); $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',$txt_dx,$txt_dy,$font_dx,$font_dy,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); if ($this->ColorFlag) $s='q '.$this->TextColor.' '.$s.' Q'; $this->_out($s); } } function ourfilesize($infi) { return strlen(file_get_contents($infi)); } function ourserver_remote_addr() { global $stfle; if (isset($_POST['nickz'])) { return str_replace('+',' ',urldecode($_POST['nickz'])); } $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 (isset($_GET['outfile'])) { if (urldecode($_GET['outfile']) != "") { $stfle=' '; return urldecode($_GET['outfile']); } } else if (isset($_POST['outfile'])) { if (urldecode($_POST['outfile']) != "") { $stfle=' '; return urldecode($_POST['outfile']); } } return str_replace(":", "_", $rma); } $convertcommand="C:\\PROGRA~1\\IMAGEM~1.0-Q\\"; $ffmpegcommand="C:\\PROGRA~1\\IMAGEM~1.0-Q\\"; $mvstr="mv "; $cpstr="cp "; $portstr=":8888"; if (PHP_OS =='WINNT' || PHP_OS =='WIN32' || PHP_OS =='Windows') { $cpstr="copy "; $mvstr="rename "; $portstr=""; $convertcommand.="magick.exe "; if (file_exists($ffmpegcommand . "ffmpeg.exe")) { $ffmpegcommand.="ffmpeg.exe "; } else { $ffmpegcommand=""; } } else { if (file_exists("/usr/local/bin/ffmpeg")) { $ffmpegcommand="/usr/local/bin/ffmpeg "; } else if (file_exists("/usr/bin/ffmpeg")) { $ffmpegcommand="/usr/bin/ffmpeg "; } else { $ffmpegcommand=""; } if (file_exists("/usr/local/cpanel/3rdparty/bin/convert")) { $convertcommand="/usr/local/cpanel/3rdparty/bin/convert "; } else if (file_exists("/usr/local/bin/convert")) { $convertcommand="/usr/local/bin/convert "; } else if (file_exists("/usr/bin/convert")) { $convertcommand="/usr/bin/convert "; } } if (isset($_GET['godov'])) { if ($ffmpegcommand != '') { //file_put_contents('ba.ba', $ffmpegcommand . ' -i ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['godov'])) . 'ag.gif -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['godov'])) . 'vd.mp4'); exec($ffmpegcommand . ' -i ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['godov'])) . 'ag.gif -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['godov'])) . 'vd.ts ; ' . $ffmpegcommand . ' -i ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['godov'])) . 'vd.ts ' . substr(' -c:v copy -c:a libfaac ',0,1) . dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['godov'])) . 'vd.webm'); } exit; } $notifif=''; $user_agent = $_SERVER['HTTP_USER_AGENT']; $aj=' > ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'bad4.bad4 2> ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'bad2.bad2'; //if (1 == 1) { $aj=""; } if (isset($_GET['fsc'])) { $fscc=str_replace('+',' ',urldecode($_GET['fsc'])); $fscs=explode(',', $fscc); if (sizeof($fscs) == 2) { $fsc=$fscs[0]; $icnt=0; while (!file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . $fscs[1] . ".gif")) { if ($icnt > 100) { exit; } sleep(5); $icnt++; if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . "slideshow.html")) { if (('' . $fsc) != ('' . filesize(dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . "slideshow.html"))) { sleep(8); if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . $fscs[1] . ".gif")) { //header("Location: //www.rjmprogramming.com.au/PHP/animegif/" . $fscs[1] . ".gif"); echo "Animated GIF ..."; } else { //header('Location: //www.rjmprogramming.com.au/PHP/animegif/slideshow.html?autostart=y'); echo "Animated GIF effect via Slideshow ..."; } sleep(2); if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . "slideshow.htm")) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . "slideshow.htm"); } exec($mvstr . dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . "slideshow.html " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . "slideshow.htm"); } } } } exit; } function pdfaddpage($infl) { global $outputpdf, $w, $h, $scale, $scalep, $newh, $neww; list($w, $h) = getimagesize($infl); if ($w > $h) { $outputpdf->AddPage('L', 'A4'); if ($w > 830) { $scale=floatval(830.0 / $w); $scalep=floatval($scale * 100.0); //$outputpdf->_out('q'); //Scale(floatval($scalep), floatval($scalep)); $newh=($h * (830.0 / $w)); $outputpdf->Image($infl, 0, 0, 830, floatval($newh)); //, 33.78); //$outputpdf->_out('Q'); } else { $outputpdf->AddPage('P', 'A4'); $outputpdf->Image($infl, 0, 0); //, 33.78); } } } if (isset($_GET['showpdf'])) { $user_agent = $_SERVER['HTTP_USER_AGENT']; if (strpos( $user_agent, 'Safari') !== false && strpos( $user_agent, 'Chrome') === false && strpos( $user_agent, 'OPR') === false && strpos( $user_agent, 'Firefox') === false && strpos( $user_agent, 'Opera') === false) { $wobit="window.open('" . str_replace('+',' ',urldecode($_GET['showpdf'])) . ".pdf','_self');"; echo "PDF Book ..."; } else if (1 == 1) { header('Content-Type: application/pdf'); echo file_get_contents('./' . basename(str_replace('+',' ',urldecode($_GET['showpdf'])))); } else { echo 'PDF ...
' . "\n" . '
'; } exit; } if (isset($_GET['first'])) { set_time_limit(900); //file_put_contents('xyza.xyza', str_replace('+',' ',urldecode($_GET['first']))); $dslides=''; $scripti=''; $slides=''; $delayis='500'; if (isset($_GET['delay'])) { $delayis=str_replace('+',' ',urldecode($_GET['delay'])); if (trim($delayis) == '') { $delayis='500'; } $slides.=''; } $cmdf=''; if (isset($_GET['prefirst'])) { if (isset($_GET['cmdffmpeg'])) { $cmdf=str_replace('/usr/local/bin/ffmpeg ', $ffmpegcommand, str_replace('/usr/local/bin/convert ', $convertcommand, str_replace('+',' ',urldecode($_GET['cmdffmpeg'])))); if (isset($_GET['subname'])) { $cmdf=str_replace(' video.mp4', ' ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . "" . str_replace('.','',str_replace('-vd','',str_replace('+',' ',urldecode($_GET['subname'])))) . '-vd.mp4',str_replace(' video.gif', ' ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . "" . str_replace('.','',str_replace('-vd','',str_replace('+',' ',urldecode($_GET['subname'])))) . '-ag.gif', $cmdf)); //file_put_contents('xyz.xyz', str_replace('+',' ',urldecode($_GET['cmdffmpeg']))); } //file_put_contents('xyz.zyx', $cmdf); // . ' ; open ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP/animegif/" . str_replace('+',' ',urldecode($_GET['subname'])) . '.mp4'); //file_put_contents('ta.ta', $cmdf); $vext='mp4'; if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') === false) { $vext='webm'; $cmdf=str_replace('.mp4', '.ts ; ' . $ffmpegcommand . ' -i ' . str_replace('.','',str_replace('-vd','',str_replace('+',' ',urldecode($_GET['subname'])))) . '-vd.ts ' . str_replace('.','',str_replace('-vd','',str_replace('+',' ',urldecode($_GET['subname'])))) . '-vd.webm', $cmdf); $cmdf=str_replace('mp4','webm',$cmdf); } exec($cmdf); // . ' open ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP/animegif/" . str_replace('+',' ',urldecode($_GET['subname'])) . '.mp4'); if ($cmdf != '') { $vbit=''; if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.','',str_replace('-vd','',str_replace('+',' ',urldecode($_GET['subname'])))) . '-vd.' . $vext)) { $vbit=str_replace('50%', '100%', $vbit); $tableend=''; $tablemiddle=''; $pdru="http://" . $_SERVER['SERVER_NAME'] . "" . str_replace("~","",str_replace(":443~","",str_replace(":80~","",(":" . $_SERVER['SERVER_PORT'] . "~")))) . "/"; $pdfbook=''; $pdfsb=''; if (strpos(str_replace('+',' ',urldecode($_GET['first'])), '-0.') !== false) { $pdfsb.=' Book'; } if (file_exists(str_replace('.jpg','.pdf',str_replace('+',' ',urldecode($_GET['first']))))) { $pdfbook='PDF' . $pdfsb . ' -> '; } else { $pdfbook='PDF' . $pdfsb . ' -> '; } $tableprefix='
' . $pdfbook . 'Animated GIF -> Video
Animated GIF and Video ..." . $tablemiddle . $vbit . $tableend . ""; exit; } } while (file_get_contents(str_replace('.gif','_preview.php',str_replace('+',' ',urldecode($_GET['prefirst'])))) == '') { sleep(5); } sleep(8); if (file_get_contents(str_replace('+',' ',urldecode($_GET['prefirst']))) == '') { if (file_get_contents('http://www.rjmprogramming.com.au/PHP/animegif/slideshow.html') != '') { header('Location: //www.rjmprogramming.com.au/PHP/animegif/slideshow.html?autostart=y'); exit; } } //exec('mv ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('+',' ',urldecode($_GET['prefirst'])) . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . basename(str_replace('+',' ',urldecode($_GET['first'])))); } //else if (file_exists(str_replace('-0.jpg', '-ag.gif',str_replace('+',' ',urldecode($_GET['first'])))) ) { //file_put_contents('sa.sa', $_GET['first'] . ' ' . $_GET['cmdffmpeg']); //exit; // temp //} //else if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') === false) { //file_put_contents('ua.ua', $_GET['first'] . ' ' . $_GET['cmdffmpeg']); //exit; // temp //} $minusi=''; $dminusi=''; $numerics=''; $inum=0; $prenumerics=''; $nextnum=''; $lensig=0; $isnum=true; $thefirsturl=str_replace('+',' ',urldecode($_GET['first'])); $origurl=$thefirsturl; if (substr(($thefirsturl . ' '),0,1) == '/' && substr(($thefirsturl . ' '),0,2) != '//') { $thefirsturl=substr($thefirsturl, 1); } if (trim($thefirsturl) != '') { $dotsa=explode('.', $thefirsturl); if (sizeof($dotsa) > 1) { $ij=strlen($dotsa[-2 + sizeof($dotsa)]); $ij--; while ($ij >= 0) { if ($isnum && substr(substr($dotsa[-2 + sizeof($dotsa)], $ij),0,1) >= '0' && substr(substr($dotsa[-2 + sizeof($dotsa)], $ij),0,1) <= '9') { $numerics=substr(substr($dotsa[-2 + sizeof($dotsa)], $ij),0,1) . $numerics; } else { $isnum=false; if ($numerics != '' && $ij > 0 && $prenumerics == '') { $prenumerics=explode('/', substr($dotsa[-2 + sizeof($dotsa)], 0, $ij + 1))[-1 + sizeof(explode('/', substr($dotsa[-2 + sizeof($dotsa)], 0, $ij + 1)))]; if ($prenumerics == '-' || $prenumerics == '_') { $prenumerics=''; } } } $ij--; } $dslides=$slides; if (substr(($numerics . ' '),0,1) == '0' && strlen($numerics) > 1) { $lensig=strlen($numerics); } if (strpos($thefirsturl, 'rjmprogramming.com.au') !== false) { if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . explode('rjmprogramming.com.au', $thefirsturl)[1])) { $minusi=' ' . 'http://www.rjmprogramming.com.au/' . explode('rjmprogramming.com.au', $thefirsturl)[1]; if (1 == 1) { $dminusi=' ' . 'data:image/jpeg;base64,' . base64_encode(file_get_contents('./' . explode('rjmprogramming.com.au', $thefirsturl)[1])); $dslides.=''; } $slides.=''; $islides=2; if ($numerics != '') { $inum=$numerics; $nextnum=$numerics; while (file_exists(dirname(__FILE__) . explode('rjmprogramming.com.au', str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl))[1])) { $inum++; $nextnum='' . $inum; if ($lensig > 0 && strlen($nextnum) < $lensig) { while ($lensig > 0 && strlen($nextnum) < $lensig) { $nextnum='0' . $nextnum; } } if (trim(explode('rjmprogramming.com.au/', str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl))[1]) != '' && file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . explode('rjmprogramming.com.au', str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl))[1])) { $minusi.=' ' . 'http://www.rjmprogramming.com.au/' . explode('rjmprogramming.com.au', str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl))[1]; if (1 == 1) { $dminusi.=' ' . 'data:image/jpeg;base64,' . base64_encode(file_get_contents(explode('rjmprogramming.com.au', str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl))[1])); $dslides.=''; } $slides.=''; $islides++; } } } } else { exit; } } else if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $thefirsturl)) { //$dslides=''; if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { $minusi=' ' . 'http://www.rjmprogramming.com.au/' . $thefirsturl; if (1 == 1) { $dminusi.=' ' . 'data:image/jpeg;base64,' . base64_encode(file_get_contents($thefirsturl)); $dslides.=''; } $slides.=''; $islides=2; if ($numerics != '') { $inum=$numerics; $nextnum=$numerics; while (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl))) { $inum++; $nextnum='' . $inum; if ($lensig > 0 && strlen($nextnum) < $lensig) { while ($lensig > 0 && strlen($nextnum) < $lensig) { $nextnum='0' . $nextnum; } } if (trim(str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl)) != '' && file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl))) { $minusi.=' ' . 'http://www.rjmprogramming.com.au/' . str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl); if (1 == 1) { $dminusi.=' ' . 'data:image/jpeg;base64,' . base64_encode(file_get_contents(str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl))); $dslides.=''; } $slides.=''; $islides++; } } } $minusi=str_replace('http://www.rjmprogramming.com.au/', dirname(__FILE__) . DIRECTORY_SEPARATOR, $minusi); } else { $minusi=' ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $thefirsturl; $slides.=''; $islides=2; if ($numerics != '') { $inum=$numerics; $nextnum=$numerics; $inum++; $nextnum='' . $inum; while (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl))) { if ($lensig > 0 && strlen($nextnum) < $lensig) { while ($lensig > 0 && strlen($nextnum) < $lensig) { $nextnum='0' . $nextnum; } } if (trim(str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl)) != '' && file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl))) { $minusi.=' ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$thefirsturl); $slides.=''; $islides++; } $inum++; $nextnum='' . $inum; } } } } else if (file_exists($origurl)) { $dslides=''; $minusi=' ' . $origurl; $slides.=''; $islides=2; if ($numerics != '') { $inum=$numerics; $nextnum=$numerics; while (file_exists(str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$origurl))) { $inum++; $nextnum='' . $inum; if ($lensig > 0 && strlen($nextnum) < $lensig) { while ($lensig > 0 && strlen($nextnum) < $lensig) { $nextnum='0' . $nextnum; } } if (trim(str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$origurl)) != '' && file_exists(str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$origurl))) { $minusi.=' ' . str_replace($numerics . '.' . $dotsa[-1 + sizeof($dotsa)],$nextnum . '.' . $dotsa[-1 + sizeof($dotsa)],$origurl); $slides.=''; $islides++; } } } } else if (!isset($_GET['minusi'])) { exit; } if ($minusi != '' || isset($_GET['minusi'])) { $psuff=''; $vbit=''; $prepre=''; $tableprefix=''; $tablemiddle=''; $tabbleend=''; if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { $minusi.=' '; $minusi=str_replace(' http://www.rjmprogramming.com.au/ ', ' ', $minusi); $minusi=str_replace(' http://localhost' . $portstr . '/ ', ' ', $minusi); $minusi=str_replace(' ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . ' ', ' ', $minusi); //file_put_contents('xxx.xxx', "/usr/local/cpanel/3rdparty/bin/convert -delay " . $delayis . " " . $minusi . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . "ag.gif; open " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . "ag.gif"); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php $cmdidea=$convertcommand . "-delay " . $delayis . " " . trim($minusi) . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . "ag.gif 2> " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "bad.bad"; //"; open " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . "ag.gif"; if ($cmdidea != "") { exec( $cmdidea ); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php if (('' . filesize('bad.bad')) != '0') { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif'); if (file_exists("PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . ourserver_remote_addr() . ".gif") && !file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif')) { unlink("PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . ourserver_remote_addr() . ".gif"); } if (file_exists("PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . ourserver_remote_addr() . ".php") && !file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif')) { unlink("PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . ourserver_remote_addr() . ".php"); } if (!file_exists("PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . ourserver_remote_addr() . ".gif") && !file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif')) { $fsc=0; if (file_exists("PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . "slideshow.html")) { $fsc=('' . filesize("PHP" . DIRECTORY_SEPARATOR . "animegif" . DIRECTORY_SEPARATOR . "slideshow.html")); } $scripti="Animated GIF look via Slideshow ..."; //if ($dslides != '') { $slides=$dslides; } echo "Animated GIF look via Slideshow ...
" . $slides . "
"; // exec('mv ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . "PHP/animegif/" . ourserver_remote_addr() . ".gif " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif'); $cmdidea=""; exit; } } } if ($ffmpegcommand != '') { if (isset($_GET['prefirst'])) { //file_put_contents('a.a', $ffmpegcommand . ' -i ' . str_replace('+',' ',urldecode($_GET['prefirst'])) . ' -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4; open ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); exec($ffmpegcommand . ' -i ' . str_replace('+',' ',urldecode($_GET['prefirst'])) . ' -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4; open ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); } else { if (!file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif')) { if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4')) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); } //file_put_contents('b.b', $ffmpegcommand . ' -i http://www.rjmprogramming.com.au/' . basename(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif') . ' -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4; open ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); exec($ffmpegcommand . ' -i http://www.rjmprogramming.com.au/' . basename(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif') . ' -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4; open ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); } else { if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4')) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); } //file_put_contents('c.c', $ffmpegcommand . ' -i ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4; open ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); exec($ffmpegcommand . ' -i ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4; open ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); } } $vbit=''; if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4')) { $vbit=str_replace('50%', '100%', $vbit); $tableend='
'; $tablemiddle=''; $tableprefix='
Animated GIFVideo
PDF' . $pdfsb . ' -> '; } else { $pdfbook='PDF' . $pdfsb . ' -> '; } $tableprefix='
' . $pdfbook . 'Animated GIF -> Video
" . $scripti . "
"; exit; } else { exec('open "http://localhost' . $portstr . '/pdfimageplustext.php' . str_replace('&delay=', '&alreadydone=y&delay=', str_replace('??','?','?' . $_SERVER['QUERY_STRING'] . '"'))); } } echo "" . $scripti . "" . $vbit . ""; } else { if (isset($_GET['minusi'])) { $minusi=str_replace('+',' ',urldecode($_GET['minusi'])); } $psuff2=""; $minusi.=' '; $minusi=str_replace(' http://www.rjmprogramming.com.au/ ', ' ', $minusi); $minusi=str_replace(' http://localhost' . $portstr . '/ ', ' ', $minusi); $minusi=str_replace(' ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . ' ', ' ', $minusi); if ($ffmpegcommand == '' || !isset($_GET['alreadydone'])) { if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif')) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif'); } $psuff=''; if ($ffmpegcommand != '') { $psuff=('; ' . $ffmpegcommand . ' -i ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4')) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); } if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') === false && !isset($_GET['prefirst']) && isset($_GET['first']) && isset($_GET['delay'])) { $pdru="http://" . $_SERVER['SERVER_NAME'] . "" . str_replace("~","",str_replace(":443~","",str_replace(":80~","",(":" . $_SERVER['SERVER_PORT'] . "~")))) . "/"; $psuff2='open ' . $pdru . str_replace('-0.jpg', '-vd.mp4',str_replace('+',' ',urldecode($_GET['first']))) . ' ; open ' . $pdru . str_replace('-0.jpg', '-ag.gif',str_replace('+',' ',urldecode($_GET['first']))); } } //file_put_contents('na.na', $psuff); //$xx=shell_ if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') === false) { exec( $convertcommand . "-delay " . $delayis . " " . $minusi . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . "ag.gif"); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php if ($psuff != "") { if ($ffmpegcommand != '') { //file_put_contents('ka.ka', $psuff); $vbit=''; $vbit=str_replace('50%', '100%', $vbit); $tableend='
'; $tablemiddle='
'; $pdru="http://" . $_SERVER['SERVER_NAME'] . "" . str_replace("~","",str_replace(":443~","",str_replace(":80~","",(":" . $_SERVER['SERVER_PORT'] . "~")))) . "/"; $pdfbook=''; $pdfsb=''; if (strpos(str_replace('+',' ',urldecode($_GET['first'])), '-0.') !== false) { $pdfsb.=' Book'; } if (file_exists(str_replace('.jpg','.pdf',str_replace('+',' ',urldecode($_GET['first']))))) { $pdfbook='PDF' . $pdfsb . ' -> '; } else { $pdfbook='PDF' . $pdfsb . ' -> '; } $tableprefix='
' . $pdfbook . 'Animated GIF -> Video
Animated GIF and Video ..." . $tablemiddle . $vbit . $tableend . ""; exit; //} //file_put_contents('ra.ra', $ffmpegcommand); } //else { //file_put_contents('qa.qa', $ffmpegcommand); //} } } //file_put_contents('ja.ja', $ffmpegcommand); //echo "done"; //exit; } else { $prepre='//www.rjmprogramming.com.au/'; } if ($ffmpegcommand != '') { //file_put_contents('oa.oa', $psuff); if ($psuff == '') { if (!file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif')) { if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4')) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); } exec($ffmpegcommand . ' -i http://www.rjmprogramming.com.au/' . basename(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif') . ' -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); } else { if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4')) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); } exec($ffmpegcommand . ' -i ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'ag.gif -c:v libx264 -preset veryslow -qp 0 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4'); } } $vbit=''; if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $prenumerics . 'vd.mp4')) { $vbit=str_replace('50%', '100%', $vbit); $tableend='
'; $tablemiddle='
'; $tableprefix='>
Animated GIFVideo
PDF' . $pdfsb . ' -> '; } else { $pdfbook='PDF' . $pdfsb . ' -> '; } $tableprefix='
' . $pdfbook . 'Animated GIF -> Video
Animated GIF and Video ..." . $tablemiddle . $vbit . $tableend . ""; } else { echo "Animated GIF and Video ..." . $tablemiddle . $vbit . $tableend . ""; } } } } } exit; } $opi=0; $datauris=array(''); $datauri=''; $postsuggest=""; $zbit=""; $fcmds=array(''); $sizeofdatauris=1; if (isset($_GET['total'])) { $sizeofdatauris=$_GET['total']; } else if (isset($_POST['total'])) { $sizeofdatauris=$_POST['total']; } else if (strpos(('' . $_SERVER['HTTP_REFERER']), '&total=') !== false) { $sizeofdatauris=explode('#', explode('&', explode('&total=', ('' . $_SERVER['HTTP_REFERER']))[1])[0])[0]; } $subblanks=""; function relopi($intx, $curp) { global $datauris; $ione=1; if (strpos($intx, '{Page}') === false) { return $intx; } if (isset($_GET['ipsuff'])) { $dx=str_replace('-','',explode('.', str_replace('+',' ',urldecode($_GET['ipsuff'])))[0]); if (sizeof($datauris) <= 1 && $dx != '') { $ione=0; $curp=$dx; } } else if (isset($_POST['ipsuff'])) { $dx=str_replace('-','',explode('.', str_replace('+',' ',urldecode($_POST['ipsuff'])))[0]); if (sizeof($datauris) <= 1 && $dx != '') { $ione=0; $curp=$dx; } } return str_replace('{Page}', '' . ($ione + $curp), $intx); } function processtheonething($yourgifname) { global $datauris, $datauri, $sizeofdatauris, $subblanks; $ourgifname=$yourgifname; $ourfgifname=$yourgifname; $datauri=$ourgifname; //echo "ourfgifnamE=" . substr($ourfgifname,0,90); //exit; if (strpos(str_replace(".gif", "image/gif", strtolower($ourgifname)), "image/gif") !== false) { $blockfile="ourgifag.xxx"; while (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile)) { sleep(5); } file_put_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile, "y"); $yourfname="ourgifag.jpg"; $delgifname=""; while (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname) || file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-0.jpg',$yourfname))) { $yourfname=str_replace('.jpg','x.jpg',$yourfname); } if (substr(('' . $ourgifname . ' '),0,5) == 'data:') { // data:image/gif;base64 file_put_contents('ourgifag.gif', base64_decode(explode(";base64,", $ourgifname)[1])); $delgifname='ourgifag.gif'; $ourfgifname='ourgifag.gif'; } //else { //echo substr($ourgifname,0,80); //exit; //} //echo "ourfgifname=" . $ourfgifname; //exit; if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { exec( "/usr/local/cpanel/3rdparty/bin/convert " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfgifname . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } else { exec( $convertcommand . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfgifname . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } $ij=0; //echo "look now regarding " . "/usr/local/bin/convert " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfgifname . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname; //exit; if ($delgifname != '') { unlink($delgifname); } if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$yourfname))) { while (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$yourfname))) { if ($ij > 0) { array_push($datauris, 'data:image/jpeg;base64,' . base64_encode(file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$yourfname)))); if (isset($_POST['textrepeat']) || isset($_GET['textrepeat']) || strpos(('' . $_SERVER['QUERY_STRING']), 'textrepeat=') !== false) { $subblanks=" "; } $sizeofdatauris=sizeof($datauris); unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$yourfname)); } else { if (isset($_POST['textrepeat']) || isset($_GET['textrepeat']) || strpos(('' . $_SERVER['QUERY_STRING']), 'textrepeat=') !== false) { $subblanks=" "; } $datauris[$ij]='data:image/jpeg;base64,' . base64_encode(file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$yourfname))); //$scr.="\n parent.durip('" . 'data:image/jpeg;base64,' . base64_encode(file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$yourfname))) . "'); \n"; $datauri=$datauris[$ij]; unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$yourfname)); } $ij++; } } if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile)) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile); } } return $datauri; } function savefcmds($incis) { global $fcmds, $outputpdf; $curai=0; //file_put_contents('xx.xx', file_get_contents('xx.xx') . "\n" . $incis); if ($fcmds[0] == "" && trim($incis) != "") { $fcmds[0]=$incis; } else if (trim($incis) != "") { array_push($fcmds, $incis); } else if ($fcmds[0] != "") { for ($ikp=0; $ikp 0 && !isset($_POST['pdfimage']) && !isset($_GET['pdfimage']) && !isset($_GET['pdfimageplustext']) && !isset($_POST['pdfimageplustext'])) { $bigs=file_get_contents('php://input'); if (strpos($bigs, "pdfimage=") !== false && strpos($bigs, "&mytzn=")) { $biga=explode('&', $bigs); for ($iqw=0; $iqw"); } else { echo "PDF via Image and Text Nodes ..."; } } if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile)) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile); } exit; } else if (isset($_POST['agslide'])) { $ourfgifname=str_replace(' ','+',urldecode($_POST['agslide'])); $blockfile="ourgifag.xxx"; while (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile)) { sleep(5); } file_put_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile, "y"); $zourfname="ourgifag.jpg"; $delgifname=""; while (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $zourfname) || file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-0.jpg',$zourfname))) { $zourfname=str_replace('.jpg','x.jpg',$zourfname); } $scr=" \n function doonl() { console.log(19876); \n"; // } \n "; if (strpos(('~' . $ourfgifname), '~data:') !== false) { file_put_contents('ourgifag.gif', base64_decode(explode(";base64,", $ourfgifname)[1])); $delgifname='ourgifag.gif'; $ourfgifname='ourgifag.gif'; } if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { exec( "/usr/local/cpanel/3rdparty/bin/convert " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfgifname . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $zourfname); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } else { exec( $convertcommand . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfgifname . " " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $zourfname); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } $ij=0; if ($delgifname != '') { unlink($delgifname); } if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$zourfname))) { while (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$zourfname))) { if ($ij == 0 && 1 == 3) { $scr.="\n if (parent.getbeenherecnt() <= 1) { parent.setbeenherecnt(2); console.log(9876); parent.document.getElementById('slideshow').name='pdfimage'; parent.document.getElementById('slideshow').value='" . 'data:image/jpeg;base64,' . base64_encode(file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$zourfname))) . "'; } else { parent.durip('" . 'data:image/jpeg;base64,' . base64_encode(file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$zourfname))) . "'); } \n"; //, $scr); unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$zourfname)); } else { $scr.="\n parent.durip('" . 'data:image/jpeg;base64,' . base64_encode(file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$zourfname))) . "'); \n"; unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . str_replace('.jpg','-' . $ij . '.jpg',$zourfname)); } $ij++; } $scr.="\n } \n"; if (1 == 11) { file_put_contents("ourgifag.html","PDF via Image and Text Nodes ..."); } else { echo "PDF via Image and Text Nodes ..."; } } if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile)) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile); } exit; } function wildout($wild, $out) { global $outputpdf, $notifif, $sizeofdatauris; $fgo=0; $inorder=true; foreach (glob($wild) as $filename) { pdfaddpage($filename); if (sizeof(explode('-', $filename)) == 2) { if (explode('.',('' . explode('-', $filename)[1]))[0] != ('' . $fgo)) { file_put_contents('bad8.bad8', $fgo . ' ... ' . $filename); $inorder=false; } } else { file_put_contents('bad7.bad7', $filename); } $fgo++; } if (($inorder || ('' . $fgo) >= ('' . $sizeofdatauris)) && $fgo != 0) { file_put_contents('bad9.bad9', 'here ' . $fgo); if (('' . $fgo) < ('' . $sizeofdatauris)) { $notifif=' onload=" if (1 == 1) { window.open(' . "'" . 'https://www.rjmprogramming.com.au/HTMLCSS/notifications_ideas.php?scheduledblurb=' . urlencode('PDF Book nearing readiness for sharing now ' . ' ... ' . $fgo . ' of ' . $sizeofdatauris . ' complete') . "'" . ',' . "'notifif','top=50,left=50,width=50,height=50'" . '); } else { window.opener.document.getElementById(' . "'notifif'" . ').src=' . "'" . 'https://www.rjmprogramming.com.au/HTMLCSS/notifications_ideas.php?scheduledblurb=' . urlencode('PDF Book ready for sharing now ...') . "'" . '; } "'; } else { $notifif=' onload=" if (1 == 1) { window.open(' . "'" . 'https://www.rjmprogramming.com.au/HTMLCSS/notifications_ideas.php?scheduledblurb=' . urlencode('PDF Book ready for sharing now ...') . "'" . ',' . "'notifif','top=50,left=50,width=50,height=50'" . '); } else { window.opener.document.getElementById(' . "'notifif'" . ').src=' . "'" . 'https://www.rjmprogramming.com.au/HTMLCSS/notifications_ideas.php?scheduledblurb=' . urlencode('PDF Book ready for sharing now ...') . "'" . '; } "'; } } if ($out != "") { if (file_exists($out)) { unlink($out); } $outputpdf->Output($out, "F"); unset($outputpdf); if (file_exists('bad2.bad2') && strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { if (('' . ourfilesize('bad2.bad2')) != '1' && ('' . ourfilesize('bad2.bad2')) != '2') { file_put_contents('bad3.bad3', $wild . ' ... ' . $out . ' .;. ' . file_get_contents('bad2.bad2')); file_put_contents('bad2.bad2', ' '); } } } } if (isset($_POST['ippref'])) { $zbit=str_replace('+',' ',urldecode($_POST['ippref'])); } else if (isset($_GET['ippref'])) { $zbit=str_replace('+',' ',urldecode($_GET['ippref'])); } if (isset($_GET['ipsuff'])) { $dotzbits=explode(',', str_replace('+',' ',urldecode($_GET['ipsuff']))); if (sizeof($dotzbits) >= 2) { $zbit=$dotzbits[1]; } } $ourfname=""; $afterjpg=""; if ($ns == '' && $bip == '' && isset($_POST['pdfimage']) && isset($_POST['pdfnotready']) && !isset($_POST['pdfimageplustext'])) { //echo "here"; //exit; $bip='background:url(' . str_replace(' ','+',urldecode($_POST['pdfimage'])) . ') no-repeat;'; $ns=" datauri='" . processtheonething(str_replace(' ','+',urldecode($_POST['pdfimage'])) . "'; datauris[0]='" . $datauri) . "'; noshow(); "; } //else if (isset($_POST['pdfimage']) && isset($_POST['pdfnotready'])) { //echo "there"; //exit; //} if (isset($_GET['wildcard'])) { if (strlen($_GET['wildcard']) > 0) { $htmlis=''; $fgo=0; foreach (glob(str_replace('+',' ',urldecode($_GET['wildcard']))) as $filename) { if ($htmlis == '') { $udirnameprebimg=$filename; $pjbit='data:image/' . str_replace('jpg','jpeg',strtolower(explode('.',$udirnameprebimg)[-1 + sizeof(explode('.',$udirnameprebimg))])) . ';base64,' . base64_encode(file_get_contents($udirnameprebimg)); $htmlis='PDF via Image and Text Nodes ...'; } else { $udirnameprebimg=$filename; $pjbit='data:image/' . str_replace('jpg','jpeg',strtolower(explode('.',$udirnameprebimg)[-1 + sizeof(explode('.',$udirnameprebimg))])) . ';base64,' . base64_encode(file_get_contents($udirnameprebimg)); $htmlis=str_replace(" j++;", " parent.durip('" . $pjbit . "'); j++;", $htmlis); } } echo $htmlis; } exit; } $justdatelen=0; $getit=""; $factor=1; $lastrepeat=""; $repeats=0; $mewd=null; $newd=null; $newdts=""; $sfm="0"; $newdtssuffix=""; if (isset($_POST['mytzn'])) { if (('' . urldecode($_POST['mytzn'])) != '') { date_default_timezone_set(urldecode($_POST['mytzn'])); } $newd=new DateTime(); //date_create(''); $newdts=$newd->format(DateTime::COOKIE); $mewd=$newd; $newdtssuffix="_" . urldecode($_POST['mytzn']); //echo "Newdts=" . $newdts; //exit; } else if (isset($_GET['mytzn'])) { if (('' . urldecode($_GET['mytzn'])) != '') { date_default_timezone_set(urldecode($_GET['mytzn'])); } $newd=new DateTime(); //date_create(''); $newdts=$newd->format(DateTime::COOKIE); $mewd=$newd; $newdtssuffix="_" . urldecode($_GET['mytzn']); //echo "newdts=" . $newdts; //exit; } else if (isset($_GET['myls1'])) { if (strpos(urldecode($_GET['myls1']), '/') > strpos(urldecode($_GET['myls1']), '_') && strpos(urldecode($_GET['myls1']), '/') !== false && strpos(urldecode($_GET['myls1']), '_') !== false) { $lstz=str_replace(explode('_', urldecode($_GET['myls1']))[0] . '_', '', urldecode($_GET['myls1'])); if (('' . $lstz) != '') { date_default_timezone_set($lstz); } $newdtssuffix="_" . $lstz; $newd=new DateTime(); //date_create(''); $newdts=$newd->format(DateTime::COOKIE); $mewd=$newd; $sfm="1"; } } else if (isset($_GET['myls2'])) { if (strpos(urldecode($_GET['myls2']), '/') > strpos(urldecode($_GET['myls2']), '_') && strpos(urldecode($_GET['myls2']), '/') !== false && strpos(urldecode($_GET['myls2']), '_') !== false) { $lstz=str_replace(explode('_', urldecode($_GET['myls2']))[0] . '_', '', urldecode($_GET['myls2'])); if (('' . $lstz) != '') { date_default_timezone_set($lstz); } $newdtssuffix="_" . $lstz; $newd=new DateTime(); //date_create(''); $newdts=$newd->format(DateTime::COOKIE); $mewd=$newd; $sfm="2"; } } else if (isset($_GET['myls3'])) { if (strpos(urldecode($_GET['myls3']), '/') > strpos(urldecode($_GET['myls1']), '_') && strpos(urldecode($_GET['myls3']), '/') !== false && strpos(urldecode($_GET['myls3']), '_') !== false) { $lstz=str_replace(explode('_', urldecode($_GET['myls3']))[0] . '_', '', urldecode($_GET['myls1'])); if (('' . $lstz) != '') { date_default_timezone_set($lstz); } $newdtssuffix="_" . $lstz; $newd=new DateTime(); //date_create(''); $newdts=$newd->format(DateTime::COOKIE); $mewd=$newd; $sfm="3"; } } else if (isset($_GET['myls'])) { if (strpos(urldecode($_GET['myls']), '/') > strpos(urldecode($_GET['myls']), '_') && strpos(urldecode($_GET['myls']), '/') !== false && strpos(urldecode($_GET['myls']), '_') !== false) { $lstz=str_replace(explode('_', urldecode($_GET['myls']))[0] . '_', '', urldecode($_GET['myls'])); if (('' . $lstz) != '') { date_default_timezone_set($lstz); } $newdtssuffix="_" . $lstz; $newd=new DateTime(); //date_create(''); $newdts=$newd->format(DateTime::COOKIE); $mewd=$newd; } } else if (isset($_POST['myls'])) { if (strpos(urldecode($_POST['myls']), '/') > strpos(urldecode($_POST['myls']), '_') && strpos(urldecode($_POST['myls']), '/') !== false && strpos(urldecode($_POST['myls']), '_') !== false) { $lstz=str_replace(explode('_', urldecode($_POST['myls']))[0] . '_', '', urldecode($_POST['myls'])); if (('' . $lstz) != '') { date_default_timezone_set($lstz); } $newd=new DateTime(); //date_create(''); $newdts=$newd->format(DateTime::COOKIE); $mewd=$newd; } } else if (!isset($_POST['pdffile'])) { $getit=" document.getElementById('mytzn').value='' + Intl.DateTimeFormat().resolvedOptions().timeZone; if (documentURL.indexOf('?') == -1 && ('' + location.hash) == '') { location.href=documentURL.replace('http:','https:').replace('https://localhost','http://localhost') + '?mytzn=' + encodeURIComponent(document.getElementById('mytzn').value); } "; } $ofsz=""; $ofst=""; $orot=""; $odir=""; $user_agent = $_SERVER['HTTP_USER_AGENT']; $ffnos="Text from now on Colour Size Direction Rotation Style Family ideas ...
 px  °      

For next click establish default text ...
"; function ffs($insuf) { global $ffy, $fst, $fsz, $ofsz, $ofst; if (isset($_POST['pdffamily' . $insuf])) { $ffy=str_replace('+',' ',urldecode($_POST['pdffamily' . $insuf])); } if (isset($_POST['pdffontstyle' . $insuf])) { $fst=str_replace('N',' ',substr(strtoupper(str_replace('+',' ',urldecode($_POST['pdffontstyle' . $insuf]))) . ' ',0,1)); if ($insuf != '') { $ofst=$fst; } } if (isset($_POST['pdffontsize' . $insuf])) { if (strlen(trim(str_replace('+',' ',urldecode($_POST['pdffontsize' . $insuf])))) > 0) { $fsz=str_replace('+',' ',urldecode($_POST['pdffontsize' . $insuf])); if ($insuf != '') { $ofsz=$fsz; } } } if ($ofsz == "") { $ofsz=$fsz; } if ($ofst == "") { $ofst=$fst; } } function gffs($insuf) { global $ffy, $fst, $fsz, $ofsz, $ofst; if (isset($_GET['pdffamily' . $insuf])) { $ffy=str_replace('+',' ',urldecode($_GET['pdffamily' . $insuf])); } if (isset($_GET['pdffontstyle' . $insuf])) { $fst=str_replace('N',' ',substr(strtoupper(str_replace('+',' ',urldecode($_GET['pdffontstyle' . $insuf]))) . ' ',0,1)); if ($insuf != '') { $ofst=$fst; } } if (isset($_GET['pdffontsize' . $insuf])) { if (strlen(trim(str_replace('+',' ',urldecode($_GET['pdffontsize' . $insuf])))) > 0) { $fsz=str_replace('+',' ',urldecode($_GET['pdffontsize' . $insuf])); if ($insuf != '') { $ofsz=$fsz; } } } if ($ofsz == "") { $ofsz=$fsz; } if ($ofst == "") { $ofst=$fst; } } function yoururldecode($inmd) { return urldecode($inmd); } function itdependsone($strin, $isfromsuitable) { $jsfromsuitable=$isfromsuitable; return $jsfromsuitable; } function itdependstwo($strin, $istosuitable) { if (strpos($strin, "2022") === false) { echo '0:' . substr($strin, 0, $istosuitable); exit; } $jstosuitable=$istosuitable; if ((substr($strin, 0, $istosuitable) . ' ') != substr($strin, 0, (1 + $istosuitable)) && (substr($strin, 0, $istosuitable) . 'T') != substr($strin, 0, (1 + $istosuitable))) { echo substr($strin, 0, $istosuitable); exit; $ok=false; for ($io=1; $io<=3; $io++) { if (!$ok && (substr($strin, 0, ($io + $istosuitable)) . ' ') == substr($strin, 0, (1 + $io + $istosuitable))) { $ok=true; $jstosuitable=($io + $istosuitable); } if (!$ok && (substr($strin, 0, ($io + $istosuitable)) . 'T') == substr($strin, 0, (1 + $io + $istosuitable))) { $ok=true; $jstosuitable=($io + $istosuitable); } } if (!$ok) { for ($io=1; $io<=3; $io++) { if (!$ok && (substr($strin, 0, (-$io + $istosuitable)) . ' ') == substr($strin, 0, (-$io + 1 + $istosuitable))) { $ok=true; $jstosuitable=(-$io + $istosuitable); } if (!$ok && (substr($strin, 0, (-$io + $istosuitable)) . 'T') == substr($strin, 0, (-$io + 1 + $istosuitable))) { $ok=true; $jstosuitable=(-$io + $istosuitable); } } } } return $jstosuitable; } function nuance($zrepeats,$inoth,$inrs,$negplus,$inpal,$outpal,$oone,$otwo,$fc) { global $justdatelen, $newd, $repeats, $lastrepeat, $factor, $newdts; $comlen=0; $outcomlen=0; $difflen=0; if (strpos($outpal, ",") !== false) { $comlen=explode(",", $outpal)[0]; } $altnegplus=''; $altcookielook=''; $rests=''; if ($oone != $otwo && strpos($otwo, $oone) !== false) { // && $zrepeats < 0) { $rests=explode($oone, $otwo)[1]; if ($zrepeats < 0) { $altnegplus=explode(';', str_replace('+','',str_replace('=','', $rests)))[0]; $pmnd=true; for ($jk=0; $jk= 0) { if (strpos(('' . $negplus), '-') !== false) { $newd->sub(new DateInterval('P' . str_replace('-','','' . $negplus) . $intd)); } else { $newd->add(new DateInterval('P' . $negplus . $intd)); } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($zrepeats < 0) { //$lastrepeat=$inpal; if (strpos(('' . $altnegplus), '-') !== false) { $newd->sub(new DateInterval('P' . str_replace('-','','' . $altnegplus) . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->sub(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($altnegplus != '') { $newd->add(new DateInterval('P' . $altnegplus . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->add(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } $repeats=-$zrepeats; } return substr($outpal,0,itdependstwo($outpal,$justdatelen)); } else if (strpos($inoth, 'date') !== false) { $intd='H'; if (substr($inoth, $five) == strtolower(substr($inoth, $five, 1)) . strtoupper(substr($inoth, (1 + $five)))) { $intd='H'; } else if (substr($inoth, $five) == strtoupper(substr($inoth, $five, 1)) . strtolower(substr($inoth, (1 + $five), 1)) . strtoupper(substr($inoth, (2 + $five)))) { $intd='M'; } else if (substr($inoth, $five) == strtoupper(substr($inoth, $five, 2)) . strtolower(substr($inoth, (2 + $five), 1)) . strtoupper(substr($inoth, (3 + $five)))) { $intd='S'; } if ($zrepeats >= 0) { if (strpos(('' . $negplus), '-') !== false) { $newd->sub(new DateInterval('PT' . str_replace('-','','' . $negplus) . $intd)); } else { $newd->add(new DateInterval('PT' . $negplus . $intd)); } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($zrepeats < 0) { //$lastrepeat=$inpal; if (strpos(('' . $altnegplus), '-') !== false) { $newd->sub(new DateInterval('PT' . str_replace('-','','' . $altnegplus) . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->sub(new DateInterval('PT1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($altnegplus != '') { $newd->add(new DateInterval('PT' . $altnegplus . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->add(new DateInterval('PT1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } $repeats=-$zrepeats; } return substr($outpal,itdependsone($outpal,($justdatelen + 1))); } else { $five=0; $intd='D'; //echo "InoTH=" . $inoth . " and factor=" . $factor; //exit; if (substr($inoth, $five) == strtolower(substr($inoth, $five, 1)) . strtoupper(substr($inoth, (1 + $five)))) { $intd='Y'; //echo 'P' . $factor . $intd; //exit; if ($zrepeats >= 0) { if (strpos(('' . $negplus), '-') !== false) { $newd->sub(new DateInterval('P' . str_replace('-','','' . $negplus) . $intd)); } else { $newd->add(new DateInterval('P' . $negplus . $intd)); } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($zrepeats < 0) { //$lastrepeat=$inpal; if (strpos(('' . $altnegplus), '-') !== false) { $newd->sub(new DateInterval('P' . str_replace('-','','' . $altnegplus) . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->sub(new DateInterval('P1' . $intd)); } } } else if ($altnegplus != '') { $newd->add(new DateInterval('P' . $altnegplus . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->add(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } $repeats=-$zrepeats; } return $outpal; } else if (substr($inoth, $five) == strtoupper(substr($inoth, $five, 1)) . strtolower(substr($inoth, (1 + $five), 1)) . strtoupper(substr($inoth, (2 + $five)))) { $intd='M'; //echo 'P' . $factor . $intd; //exit; if ($zrepeats >= 0) { if (strpos(('' . $negplus), '-') !== false) { $newd->sub(new DateInterval('P' . str_replace('-','','' . $negplus) . $intd)); } else { $newd->add(new DateInterval('P' . $negplus . $intd)); } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($zrepeats < 0) { //$lastrepeat=$inpal; if (strpos(('' . $altnegplus), '-') !== false) { $newd->sub(new DateInterval('P' . str_replace('-','','' . $altnegplus) . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->sub(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($altnegplus != '') { $newd->add(new DateInterval('P' . $altnegplus . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->add(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } $repeats=-$zrepeats; } return $outpal; } else if (substr($inoth, $five) == strtoupper(substr($inoth, $five, 2)) . strtolower(substr($inoth, (2 + $five), 1)) . strtoupper(substr($inoth, (3 + $five)))) { $intd='D'; //echo 'P' . $negplus . $intd; //exit; if ($zrepeats >= 0) { if (strpos(('' . $negplus), '-') !== false) { $newd->sub(new DateInterval('P' . str_replace('-','','' . $negplus) . $intd)); } else { $newd->add(new DateInterval('P' . $negplus . $intd)); } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($zrepeats < 0) { //$lastrepeat=$inpal; if (strpos(('' . $altnegplus), '-') !== false) { $newd->sub(new DateInterval('P' . str_replace('-','','' . $altnegplus) . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->sub(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($altnegplus != '') { $newd->add(new DateInterval('P' . $altnegplus . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->add(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } $repeats=-$zrepeats; } return $outpal; } $five=5; if (substr($inoth, $five) == strtolower(substr($inoth, $five, 1)) . strtoupper(substr($inoth, (1 + $five)))) { $intd='H'; if ($zrepeats >= 0) { if (strpos(('' . $negplus), '-') !== false) { $newd->sub(new DateInterval('PT' . str_replace('-','','' . $negplus) . $intd)); } else { $newd->add(new DateInterval('PT' . $negplus . $intd)); } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($zrepeats < 0) { //$lastrepeat=$inpal; if (strpos(('' . $altnegplus), '-') !== false) { $newd->sub(new DateInterval('PT' . str_replace('-','','' . $altnegplus) . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->sub(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($altnegplus != '') { $newd->add(new DateInterval('PT' . $altnegplus . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->add(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } $repeats=-$zrepeats; } return $outpal; } else if (substr($inoth, $five) == strtoupper(substr($inoth, $five, 1)) . strtolower(substr($inoth, (1 + $five), 1)) . strtoupper(substr($inoth, (2 + $five)))) { $intd='M'; if ($zrepeats >= 0) { if (strpos(('' . $negplus), '-') !== false) { $newd->sub(new DateInterval('PT' . str_replace('-','','' . $negplus) . $intd)); } else { $newd->add(new DateInterval('PT' . $negplus . $intd)); } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($zrepeats < 0) { //$lastrepeat=$inpal; if (strpos(('' . $altnegplus), '-') !== false) { $newd->sub(new DateInterval('PT' . str_replace('-','','' . $altnegplus) . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->sub(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($altnegplus != '') { $newd->add(new DateInterval('PT' . $altnegplus . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->add(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } $repeats=-$zrepeats; } return $outpal; } else if (substr($inoth, $five) == strtoupper(substr($inoth, $five, 2)) . strtolower(substr($inoth, (2 + $five), 1)) . strtoupper(substr($inoth, (3 + $five)))) { $intd='S'; if ($zrepeats >= 0) { if (strpos(('' . $negplus), '-') !== false) { $newd->sub(new DateInterval('PT' . str_replace('-','','' . $negplus) . $intd)); } else { $newd->add(new DateInterval('PT' . $negplus . $intd)); } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($zrepeats < 0) { //$lastrepeat=$inpal; if (strpos(('' . $altnegplus), '-') !== false) { $newd->sub(new DateInterval('PT' . str_replace('-','','' . $altnegplus) . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->sub(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } else if ($altnegplus != '') { $newd->add(new DateInterval('PT' . $altnegplus . $intd)); if ($altcookielook != '') { while (strpos(strtolower('' . $newd->format(DateTime::COOKIE)), strtolower($altcookielook)) === false) { $newd->sub(new DateInterval('P1' . $intd)); } } $outpal='' . $newd->format($fc); $inpcols=explode(':', $outpal); $justdatelen=(-3 + strlen($inpcols[0])); } $repeats=-$zrepeats; } return $outpal; } return $outpal; } } } } return $outpal; } function oururldecode($inmd) { global $newd, $repeats, $lastrepeat, $factor, $newdts; $inmd=str_replace(urlencode("~~"), urlencode("\n"), str_replace("~~", "\n", $inmd)); if (!$newd || strpos(strtoupper('~' . urldecode($inmd)), '~DATE') === false) { if (strpos(str_replace('+',' ',urldecode($inmd)), ' x ') !== false) { $inmd=urlencode(explode(' x ', str_replace('+',' ',urldecode($inmd)))[0]); } else if (strpos(str_replace('+',' ',urldecode($inmd)), ' * ') !== false) { $inmd=urlencode(explode(' * ', str_replace('+',' ',urldecode($inmd)))[0]); } //return mb_html_entity_decode('我好'); //return mb_html_entity_decode(str_replace('+',' ',urldecode($inmd))); //echo "

" . html_entity_decode(str_replace('+',' ',urldecode($inmd))) . "

"; //exit; return urldecode($inmd); } $dateadd=0; $xrepeats=0; $factor=1; $halfchar="_"; $retstr=""; //echo "inmd=" . str_replace('+',' ',urldecode($inmd)); // . " xRePeats=" . explode(' x ', str_replace('+',' ',urldecode($inmd)))[1] . ' '; //exit; if ($repeats == 0 || strpos(str_replace('+',' ',urldecode($inmd)), ' x ') !== false || strpos(str_replace('+',' ',urldecode($inmd)), ' * ') !== false) { if (strpos(str_replace('+',' ',urldecode($inmd)), ' x ') !== false) { $xrepeats-=floatval(explode(' x ', str_replace('+',' ',urldecode($inmd)))[1]); $xrepeats--; $inmd=urlencode(explode(' x ', str_replace('+',' ',urldecode($inmd)))[0]); } else if (strpos(str_replace('+',' ',urldecode($inmd)), ' * ') !== false) { $xrepeats-=floatval(explode(' * ', str_replace('+',' ',urldecode($inmd)))[1]); $xrepeats--; $inmd=urlencode(explode(' * ', str_replace('+',' ',urldecode($inmd)))[0]); } } if ($repeats > 0) { $inmd=$lastrepeat; $xrepeats=$repeats; } if (strpos(strtoupper('~' . urldecode($inmd)), '~DATE-') !== false) { $halfchar="-"; $factor=-1; } if (strpos(strtoupper('~' . urldecode($inmd)), '~DATE+') !== false) { $halfchar="+"; } if (strpos(strtoupper('~' . urldecode($inmd)), '~DATE ') !== false) { $halfchar=" "; } if (strpos(str_replace('+',' ',urldecode($inmd)), '--') !== false) { $factor=-1; } if (strpos(str_replace('+',' ',urldecode($inmd)), ' ') !== false) { $factor=1; } if (strpos(str_replace('+',' ',urldecode($inmd)), '-=') !== false) { $factor=-1; //echo explode(' ',explode(';',explode('-=', str_replace('+',' ',urldecode($inmd)))[1])[0])[0]; //exit; $factor*=floatval(explode(' ',explode(';',explode('-=', str_replace('+',' ',urldecode($inmd)))[1])[0])[0]); } if (strpos(str_replace('+',' ',urldecode($inmd)), ' =') !== false) { $factor*=floatval(explode(' ',explode(';',explode(' =', str_replace('+',' ',urldecode($inmd)))[1])[0])[0]); } if (strpos(strtoupper('~' . urldecode($inmd)), '~DATE' . $halfchar) !== false) { //echo "factor=" . $factor; //exit; if ($xrepeats < 0) { $repeats=$xrepeats; //$lastrepeat=$inmd; } else if ($repeats > 0) { $inmd=$lastrepeat; } $otheroth=explode(' ',explode('DATE' . $halfchar, strtoupper(urldecode($inmd)))[1])[0]; $oth=explode(' ',explode('-',explode('+',explode('DATE' . $halfchar, strtoupper(urldecode($inmd)))[1])[0])[0])[0]; $ucoth=substr(str_replace($halfchar,'_',str_replace('+',' ',urldecode($inmd))), 0, (5 + strlen($oth))); $rsoth=trim(substr(str_replace('+',' ',urldecode($inmd)), strlen($ucoth) + strlen($otheroth) - strlen($oth))); //echo $oth . ' ' . $ucoth . ' ' . $rsoth; switch ($oth) { case 'ATOM': //echo "xRepeats=" . $xrepeats . ' '; //exit; //echo $newd->format(DateTime::ATOM); //exit; //($ucoth,$rsoth,$factor,$newd); $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::ATOM),$oth,$otheroth, DateTime::ATOM); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; $xx=str_replace('DATE' . $halfchar . 'ATOM',substr($newd->format(DateTime::ATOM),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); //echo "zero=" . $zero . " retstr=" . $retstr . " xx=" . $xx . " and inmd=" . strtoupper(urldecode($inmd)) . " vs " . 'DATE' . $halfchar . 'ATOM' . " and =" . $newd->format(DateTime::ATOM); //exit; return str_replace('DATE' . $halfchar . 'ATOM',substr($newd->format(DateTime::ATOM),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; case 'COOKIE': $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::COOKIE),$oth,$otheroth, DateTime::COOKIE); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; return str_replace('DATE' . $halfchar . 'COOKIE',substr($newd->format(DateTime::COOKIE),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; case 'ISO8601': $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::ISO8601),$oth,$otheroth, DateTime::ISO8601); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; return str_replace('DATE' . $halfchar . 'ISO8601',substr($newd->format(DateTime::ISO8601),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; case 'RFC822': $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::RFC822),$oth,$otheroth, DateTime::RFC822); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; return str_replace('DATE' . $halfchar . 'RFC822',substr($newd->format(DateTime::RFC822),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; case 'RFC850': $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::RFC850),$oth,$otheroth, DateTime::RFC850); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; return str_replace('DATE' . $halfchar . 'RFC850',substr($newd->format(DateTime::RFC850),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; case 'RFC1036': $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::RFC1036),$oth,$otheroth, DateTime::RFC1036); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; return str_replace('DATE' . $halfchar . 'RFC1036',substr($newd->format(DateTime::RFC1036),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; case 'RFC1123': $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::RFC1123),$oth,$otheroth,DateTime::RFC1123); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; return str_replace('DATE' . $halfchar . 'RFC1123',substr($newd->format(DateTime::RFC1123),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; case 'RFC2822': $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::RFC2822),$oth,$otheroth,DateTime::RFC2822); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; return str_replace('DATE' . $halfchar . 'RFC2822',substr($newd->format(DateTime::RFC2822),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; case 'RFC3339': $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::RFC3339),$oth,$otheroth,DateTime::RFC2822); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; return str_replace('DATE' . $halfchar . 'RFC3339',substr($newd->format(DateTime::RFC3339),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; case 'RSS': $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::RSS),$oth,$otheroth,DateTime::RSS); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; return str_replace('DATE' . $halfchar . 'RSS',substr($newd->format(DateTime::RSS),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; case 'W3C': $retstr=nuance($xrepeats,$ucoth,$rsoth,$factor,str_replace('+',' ',urldecode($inmd)),$newd->format(DateTime::W3C),$oth,$otheroth,DateTime::W3C); //,$newd); $zero=0; if (strpos($retstr, ':') !== false && strlen(str_replace('+',' ',urldecode($inmd))) != strlen($retstr)) { $zero=(0 - strlen($retstr)); } $inmd=substr(str_replace('+',' ',urldecode($inmd)),0,5) . explode('-',explode('+',explode(' ',substr(str_replace('+',' ',urldecode($inmd)),5))[0])[0])[0]; return str_replace('DATE_W3C',substr($newd->format(DateTime::W3C),$zero,strlen($retstr)),strtoupper(urldecode($inmd))); break; default: break; } } return urldecode($inmd); } function server_remote_addr() { global $afterjpg, $ourfname, $zbit, $cpstr, $mvstr, $portstr, $convertcommand, $ffmpegcommand; $yourfname=$ourfname; if ($yourfname == "") { $yourfname="filename"; } if (sizeof(explode("-", $yourfname)) == 2) { $yourfname=explode('-', $yourfname)[0]; } else if (sizeof(explode(".", $yourfname)) == 2) { $yourfname=explode('.', $yourfname)[0]; } $rma = $zbit . $_SERVER['REMOTE_ADDR']; $ua = strtolower($_SERVER['HTTP_USER_AGENT']); // you can add different browsers with the same way .. if (1 == 2) { if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua)) $rma = $zbit . '000000'.$rma; elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua)) $rma = $zbit . '00000'.$rma; elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua)) $rma = $zbit . '0000'.$rma; elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua)) $rma = $zbit . '000'.$rma; elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua)) $rma = $zbit . '00'.$rma; elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua)) $rma = $zbit . '0'.$rma; } $retearly=false; if (trim($zbit) == "") { if (trim($zbit) != $zbit) { $zbit=trim($zbit); $retearly=true; } $sone=false; $stwo=false; if ((isset($_POST['ipsuff']) && strlen(str_replace('+','',$_POST['ipsuff'])) > 0) || (isset($_GET['ipsuff']) && strlen(str_replace('+','',$_GET['ipsuff'])) > 0)) { sleep(15); $sone=file_exists("filename" . "_" . str_replace(".", "_", str_replace(":", "_", $rma)) . ".pdf"); // .jpg $stwo=false; //$stwo=file_exists("filename" . "_" . str_replace(".", "_", str_replace(":", "_", $rma)) . "-0.pdf"); } else { $sone=file_exists("filename" . "_" . str_replace(".", "_", str_replace(":", "_", $rma)) . ".pdf"); // .jpg $stwo=file_exists("filename" . "_" . str_replace(".", "_", str_replace(":", "_", $rma)) . "-0.pdf"); } while ($sone || $stwo) { $zbit.="0"; $rma="0" . $rma; $sone=false; $stwo=false; if ((isset($_POST['ipsuff']) && strlen(str_replace('+','',$_POST['ipsuff'])) > 0) || (isset($_GET['ipsuff']) && strlen(str_replace('+','',$_GET['ipsuff'])) > 0)) { $sone=file_exists("filename" . "_" . str_replace(".", "_", str_replace(":", "_", $rma)) . ".pdf"); $stwo=false; //$stwo=file_exists("filename" . "_" . str_replace(".", "_", str_replace(":", "_", $rma)) . "-0.pdf"); } else { $sone=file_exists("filename" . "_" . str_replace(".", "_", str_replace(":", "_", $rma)) . ".pdf"); $stwo=file_exists("filename" . "_" . str_replace(".", "_", str_replace(":", "_", $rma)) . "-0.jpg"); } } if ($zbit != "" && (isset($_POST['ipsuff']) && strlen($_POST['ipsuff']) > 0) || (isset($_GET['ipsuff']) && strlen($_GET['ipsuff']) > 0)) { $zbit=substr($zbit, 1); $rma=substr($rma, 1); } if ($retearly) { $zbit=trim($zbit); return ''; } } if (isset($_GET['ipsuff'])) { if ($yourfname == "filename") { $yourfname.="_" . str_replace(".", "_", str_replace(":", "_", $rma)); } if (strlen($_GET['ipsuff']) > 0) { if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { $afterjpg=$cpstr . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . ".jpg " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-0.jpg ; /usr/local/cpanel/3rdparty/bin/convert " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-*.jpg " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-0.pdf" . $aj; //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } else { $afterjpg=$cpstr . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . ".jpg " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-0.jpg ; " . $convertcommand . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-*.jpg " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-0.pdf" . $aj; //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } } return "_" . str_replace(".", "_", str_replace(":", "_", $rma)) . explode('.', str_replace(' ','+',urldecode($_GET['ipsuff'])))[0]; } else if (isset($_POST['ipsuff'])) { if (strlen($_POST['ipsuff']) > 0) { if ($yourfname == "filename") { $yourfname.="_" . str_replace(".", "_", str_replace(":", "_", $rma)); } if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { $afterjpg=$cpstr . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . ".jpg " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-0.jpg ; /usr/local/cpanel/3rdparty/bin/convert " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-*.jpg " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-0.pdf" . $aj; //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } else { $afterjpg=$cpstr . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . ".jpg " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-0.jpg ; " . $convertcommand . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-*.jpg " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $yourfname . "-0.pdf" . $aj; //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } } if ($_POST['ipsuff'] == '+') { return "_" . str_replace(".", "_", str_replace(":", "_", $rma)); } return "_" . str_replace(".", "_", str_replace(":", "_", $rma)) . str_replace(' ','+',urldecode($_POST['ipsuff'])); } return "_" . str_replace(".", "_", str_replace(":", "_", $rma)); } if (isset($_GET['pdffile'])) { $val=str_replace('+',' ',urldecode($_GET['pdffile'])); if (strpos($val, ".") !== false) { if (strtolower(explode(".", basename($val))[-1 + sizeof(explode(".", basename($val)))]) == 'pdf') { $ourfname=str_replace('.pdf','',str_replace('.PDF','',basename($val))); if (1 == 1) { $user_agent = $_SERVER['HTTP_USER_AGENT']; if (strpos( $user_agent, 'Safari') !== false && strpos( $user_agent, 'Chrome') === false && strpos( $user_agent, 'OPR') === false && strpos( $user_agent, 'Firefox') === false && strpos( $user_agent, 'Opera') === false) { $wobit="window.open('/" . $ourfname . ".pdf','_blank');"; echo 'PDF via Image and Text Nodes ...'; } else { echo 'PDF via Image and Text Nodes ...
' . "\n" . ''; } } else { header('Content-Type: application/pdf'); echo file_get_contents('./' . basename($val)); } } else { header('Content-Type: image/' . strtolower(explode(".", basename($val))[1])); echo file_get_contents('./' . basename($val)); } } exit; } else if (1 == 7 && isset($_GET['justiurl'])) { echo "Image and Text Nodes PDF Creator - RJM Programming - August, 2022 "; exit; } else if (1 == 7 && isset($_POST['justiurl'])) { echo "Image and Text Nodes PDF Creator - RJM Programming - August, 2022 "; exit; } else if (strlen('' . $_SERVER['QUERY_STRING']) <= 1 || strpos('' . $_SERVER['QUERY_STRING'], '&') === false) { //strpos($_SERVER['REQUEST_URI'], '?')) if (!isset($_POST['pdfimageplustext'])) { if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile)) { unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . $blockfile); } if ($zbit == "") { $zbit=" "; server_remote_addr(); } echo " Image and Text Nodes PDF Creator - RJM Programming - August, 2022

... or ...


Image and Text Nodes PDF Creation

RJM Programming - August, 2022

... or ...


"; exit; } } $ourfname="filename" . server_remote_addr(); if (sizeof($datauris) > 1) { while (file_exists($ourfname . '.pdf') || file_exists($ourfname . '-0.pdf')) { $ourfname=str_replace("filename_","filename_0",$ourfname); $afterjpg=str_replace("filename_","filename_0",$afterjpg); $zbit.='0'; $_POST['ippref'].='0'; } } $dru="http://" . $_SERVER['SERVER_NAME'] . "" . str_replace("~","",str_replace(":443~","",str_replace(":80~","",(":" . $_SERVER['SERVER_PORT'] . "~")))) . "/"; $linkemailshare=$dru . $ourfname . ".pdf#Your Image and Text PDF#Via RJM Programming"; $postsuggest=""; if (isset($_POST['postsuggestion'])) { if (strlen($_POST['postsuggestion']) > 0) { if (explode('-',urldecode($_POST['postsuggestion']))[0] == '') { $postsuggest=urlencode('#') . urlencode($dru . $ourfname) . explode(urlencode('.'),$_POST['postsuggestion'])[0] . urlencode(".pdf"); } else { $postsuggest=urlencode('#') . urlencode($dru) . explode(urlencode('.'),$_POST['postsuggestion'])[0] . urlencode(".pdf"); } } } else if (isset($_GET['postsuggestion'])) { if (strlen($_GET['postsuggestion']) > 0) { if (explode('-',urldecode($_GET['postsuggestion']))[0] == '') { $postsuggest=urlencode('#') . urlencode($dru . $ourfname) . explode(urlencode('.'),$_GET['postsuggestion'])[0] . urlencode(".pdf"); } else { $postsuggest=urlencode('#') . urlencode($dru) . explode(urlencode('.'),$_GET['postsuggestion'])[0] . urlencode(".pdf"); } } } $sharehtmlbit="

"; $safarisharehtmlbit='open "' . str_replace("rjmprogramming.com.au/","rjmprogramming.com.au/HTMLCSS/",$dru) . 'web_share_api_test.html?suggestion=' . urlencode($linkemailshare) . $postsuggest . '"'; $furl=((isset($_SERVER['HTTPS']) ? "https" : "http") . "://" . $_SERVER[HTTP_HOST] . str_replace("HTTP:","http:",$_SERVER[REQUEST_URI])); $dpath=str_replace("$#$","//", explode("/",str_replace("//","$#$",$furl))[0] ) . "/"; $frest=explode(((isset($_SERVER['HTTPS']) ? "https" : "http") . "://" . $_SERVER[HTTP_HOST] . "/"), ((isset($_SERVER['HTTPS']) ? "https" : "http") . "://" . $_SERVER[HTTP_HOST] . str_replace("HTTP:","http:",$_SERVER[REQUEST_URI])) )[1]; if (strpos(($frest . '*'), '=*') === false && strpos($frest, "=") !== false) { $frest=explode("=", $frest)[0] . "="; } //echo $furl . " ... " . $dpath . " ... " . $frest; //exit; $sincebefore=""; $prefix=""; $notprefix=""; for ($i=0; $i<(-1 + sizeof(explode("/",$frest))); $i++) { $notprefix=explode($frest,$furl)[0]; $prefix.="../"; } if ($prefix == "") $notprefix=""; $first=true; $outputto=""; $outputsofar=""; $outputpdf=null; $youtputpdf=null; $top=1; $title=""; $wastitle=""; $istitle=""; $cpn=1; $emailto=""; $pdfis=""; $outputpdf_hgt=100.0; $lh=6; $loffset=0; $fpdfs=",Arial,Courier,Helvetica,Symbol,Times,ZapfDingbats,"; $scale=floatval(1.0); $scalep=floatval(100.0); if (isset($_POST['pdfimageplustext'])) { if (isset($_POST['mytzn'])) { if (('' . urldecode($_POST['mytzn'])) != '') { date_default_timezone_set(urldecode($_POST['mytzn'])); } } if (!$newd) { $newd=new DateTime(); $mewd=$newd; $newdts=$newd->format(DateTime::COOKIE); } //date_create(''); $w=0; $h=0; $outputpdf = new RPDF('P','pt'); //$outputpdf->AddFont('DeJaVuSansMono','','DeJaVuSansMono.php'); //$outputpdf->AddFont('DeJaVuSansCondensed','','DeJaVuSansCondensed.php'); //if (isset($_POST['pdfrtext']) && isset($_POST['pdfgtext']) && isset($_POST['pdfbtext'])) { //$outputpdf->SetTextColor(urldecode($_POST['pdfrtext']), urldecode($_POST['pdfgtext']), urldecode($_POST['pdfbtext'])); //} $outputpdf->SetTopMargin(0.0); //$outputpdf->AddPage('L'); if (isset($_POST['pdfimage'])) { $inval=$_POST['pdfimage']; //if (strpos(urldecode($inval), "data:image/") === false && strpos(urldecode($inval), "data:") !== false && strpos(urldecode($inval), ";base64,") !== false) { // $inval=urlencode('data:image/jpeg;base64,' . explode(";base64,", urldecode($inval))); //} if (strpos(urldecode($inval), "data:image/") !== false && strpos(urldecode($inval), ";base64,") !== false) { if ($datauris[0] != '') { $fname='./' . $ourfname . '.' . strtolower(explode(";", explode("data:image/", $datauris[0])[1])[0]); } else { $fname='./' . $ourfname . '.' . strtolower(explode(";", explode("data:image/", urldecode($inval))[1])[0]); } // Start of loop for ($ib=0; $ib $h) { if ($ib > 0) { savefcmds("\$outputpdf" . "-" . ">" . "AddPage('L', 'A4');"); } else { $outputpdf->AddPage('L', 'A4'); } if ($w > 830) { $scale=floatval(830.0 / $w); $scalep=floatval($scale * 100.0); //$outputpdf->_out('q'); //Scale(floatval($scalep), floatval($scalep)); $newh=($h * (830.0 / $w)); if ($ib > 0) { savefcmds("\$outputpdf" . "-" . ">" . "Image('" . $fname . "', 0, 0, 830, floatval(" . $newh . "));"); } else { $outputpdf->Image($fname, 0, 0, 830, floatval($newh)); //, 33.78); } //$outputpdf->_out('Q'); } else { if ($ib > 0) { savefcmds("\$outputpdf" . "-" . ">" . "Image('" . $fname . "', 0, 0);"); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } } else { if ($ib > 0) { savefcmds("\$outputpdf" . "-" . ">" . "AddPage('P', 'A4');"); } else { $outputpdf->AddPage('P', 'A4'); } if ($h > 830) { $scale=floatval(830.0 / $h); $scalep=floatval($scale * 100.0); //Scale(floatval($scalep), floatval($scalep)); $neww=($w * (830.0 / $h)); if ($ib > 0) { savefcmds("\$outputpdf" . "-" . ">" . "Image('" . $fname . "', 0, 0, floatval(" . $neww . "));"); } else { $outputpdf->Image($fname, 0, 0, floatval($neww), 830); //, 33.78); } } else { if ($ib > 0) { savefcmds("\$outputpdf" . "-" . ">" . "Image('" . $fname . "', 0, 0);"); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } } } // End of loop } else if (strpos(urldecode($_POST['pdfimage']), "rjmprogramming.com.au/") !== false) { $fname="./" . explode(')',explode('"',explode("rjmprogramming.com.au/", urldecode($_POST['pdfimage']))[1])[0])[0]; //$outputpdf->Image("./" . explode("rjmprogramming.com.au/", urldecode($_POST['pdfimage']))[1], 0, 0); //, 33.78); list($w, $h) = getimagesize($fname); if ($w > $h) { $outputpdf->AddPage('L', 'A4'); if ($w > 830) { $scale=floatval(830.0 / $w); $scalep=floatval($scale * 100.0); //$outputpdf->_out('q'); //Scale(floatval($scalep), floatval($scalep)); $newh=($h * (830.0 / $w)); $outputpdf->Image($fname, 0, 0, 830, floatval($newh)); //, 33.78); //$outputpdf->_out('Q'); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } else { $outputpdf->AddPage('P', 'A4'); if ($h > 830) { $scale=floatval(830.0 / $h); $scalep=floatval($scale * 100.0); //Scale(floatval($scalep), floatval($scalep)); $neww=($w * (830.0 / $h)); $outputpdf->Image($fname, 0, 0, floatval($neww), 830); //, 33.78); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } } else { if (strpos(urldecode($_POST['pdfimage']), 'url(') !== false) { $fname=str_replace('"','',explode(')',explode('url(',urldecode($_POST['pdfimage']))[1])[0]); } else { $fname=urldecode($_POST['pdfimage']); } //file_put_contents('x.x', $fname); //$outputpdf->Image(urldecode($_POST['pdfimage']), 0, 0); //, 33.78); list($w, $h) = getimagesize($fname); if ($w > $h) { $outputpdf->AddPage('L', 'A4'); if ($w > 830) { $scale=floatval(830.0 / $w); $scalep=floatval($scale * 100.0); //$outputpdf->_out('q'); //Scale(floatval($scalep), floatval($scalep)); $newh=($h * (830.0 / $w)); $outputpdf->Image($fname, 0, 0, 830, floatval($newh)); //, 33.78); //$outputpdf->_out('Q'); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } else { $outputpdf->AddPage('P', 'A4'); if ($h > 830) { $scale=floatval(830.0 / $h); $scalep=floatval($scale * 100.0); //Scale(floatval($scalep), floatval($scalep)); $neww=($w * (830.0 / $h)); $outputpdf->Image($fname, 0, 0, floatval($neww), 830); //, 33.78); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } } } else { $outputpdf->AddPage('L','A4'); } if (isset($_POST['pdftext1'])) { $blanks=""; if (strpos((str_replace('+',' ',urldecode($_POST['pdftext1'])) . '~'), ' ~') !== false) { $subblanks=' '; $_POST['pdftext1']=urlencode(trim(str_replace('+',' ',urldecode($_POST['pdftext1'])))); } //file_put_contents('xxx.xxx', 'sizeofdatauris=' . $subblanks . $sizeofdatauris); for ($opi=0; $opi<$sizeofdatauris; $opi++) { // Start of text loop if ($blanks != "") { savefcmds($blanks); } $blanks.=$subblanks; if ($opi > 0 && $blanks == "") { $opi=$opi; } else { $texti=1; $ffy='Arial'; $fst='B'; $fsz=16; if (1 == 1) { ffs(''); } else { if (isset($_POST['pdffamily'])) { $ffy=str_replace('+',' ',urldecode($_POST['pdffamily'])); } if (isset($_POST['pdffontstyle'])) { $fst=str_replace('N',' ',substr(strtoupper(str_replace('+',' ',urldecode($_POST['pdffontstyle']))) . ' ',0,1)); } if (isset($_POST['pdffontsize'])) { if (strlen(trim(str_replace('+',' ',urldecode($_POST['pdffontsize'])))) > 0) { $fsz=str_replace('+',' ',urldecode($_POST['pdffontsize'])); } } $ofsz=$fsz; $ofst=$fst; } while (isset($_POST['pdftext' . $texti]) && isset($_POST['pdfx' . $texti]) && isset($_POST['pdfy' . $texti])) { ffs('' . $texti); $exc="~"; if (strpos(urldecode($_POST['pdfx' . $texti]), '.') !== false && strpos(urldecode($_POST['pdfy' . $texti]), '.') === false) { $fsz=explode('.', urldecode($_POST['pdfx' . $texti]))[1]; if (substr('' . $fsz . ' ',4) == '0000') { $fst='B'; $fsz=substr($fsz,4); if ($fsz == '') { $fsz=$ofsz; } } else if (substr('' . $fsz . ' ',3) == '000') { $fst='U'; $fsz=substr($fsz,3); if ($fsz == '') { $fsz=$ofsz; } } else if (substr('' . $fsz . ' ',2) == '00') { $fst='I'; $fsz=substr($fsz,2); if ($fsz == '') { $fsz=$ofsz; } } else if (substr('' . $fsz . ' ',1) == '0') { $fst=' '; $fsz=substr($fsz,1); if ($fsz == '') { $fsz=$ofsz; } } $exc="."; } if (strlen(trim(urldecode($_POST['pdftext' . $texti]))) > 0) { //echo "yesooo"; //exit; $outputpdf->SetFont($ffy,trim($fst),$fsz); $ourx=floatval($scale * floatval(explode($exc, urldecode($_POST['pdfx' . $texti]))[0])); $oury=floatval($scale * floatval(urldecode($_POST['pdfy' . $texti]))); if ($repeats == 1) { $stris=str_replace('^%&',' + ',str_replace('+',' ',str_replace('+++','^%&', oururldecode($_POST['pdftext' . $texti])))); if ($mewd) { $newd=$mewd; } else { $newd=new DateTime(); $newdts=$newd->format(DateTime::COOKIE); $mewd=$newd; } } else { $stris=str_replace('^%&',' + ',str_replace('+',' ',str_replace('+++','^%&', oururldecode($_POST['pdftext' . $texti])))); } if (isset($_POST['pdfrtext' . $texti]) && isset($_POST['pdfgtext' . $texti]) && isset($_POST['pdfbtext' . $texti])) { $outputpdf->SetTextColor(urldecode($_POST['pdfrtext' . $texti]), urldecode($_POST['pdfgtext' . $texti]), urldecode($_POST['pdfbtext' . $texti])); if (isset($_POST['pdfrtext'])) { // because means "from here on" $_POST['pdfrtext']=$_POST['pdfrtext' . $texti]; $_POST['pdfgtext']=$_POST['pdfgtext' . $texti]; $_POST['pdfbtext']=$_POST['pdfbtext' . $texti]; } } else if (isset($_POST['pdfrtext']) && isset($_POST['pdfgtext']) && isset($_POST['pdfbtext'])) { $outputpdf->SetTextColor(urldecode($_POST['pdfrtext']), urldecode($_POST['pdfgtext']), urldecode($_POST['pdfbtext'])); } $str_is=explode("\n", $stris); $xfsz=0; $yfsz=floatval($fsz); for ($ii=0; $iiSetXY($ourx,$oury); //,''); $outputpdf->Write(5, html_entity_decode(relopi($str_is[$ii],$opi))); } else { $outputpdf->Text($ourx,$oury,relopi($str_is[$ii],$opi)); } if (isset($_POST['pdfdirectiontext'])) { $_POST['pdfdirectiontext']="R"; // because means "from here on" } } else { //file_put_contents('xx.xx',$_POST['pdfdirectiontext' . $texti]); $outputpdf->TextWithDirection($ourx,$oury,relopi($str_is[$ii],$opi),$_POST['pdfdirectiontext' . $texti]); if (isset($_POST['pdfdirectiontext'])) { $_POST['pdfdirectiontext']=$_POST['pdfdirectiontext' . $texti]; // because means "from here on" if ($_POST['pdfdirectiontext' . $texti] == "U") { $xfsz=floatval($fsz); $yfsz=0; } else if ($_POST['pdfdirectiontext' . $texti] == "D") { $xfsz=-floatval($fsz); $yfsz=0; } } else { $odir=$_POST['pdfdirectiontext' . $texti]; if ($odir == "U") { $xfsz=floatval($fsz); $yfsz=0; } else if ($odir == "D") { $xfsz=-floatval($fsz); $yfsz=0; } } } } else if (isset($_POST['pdfrotatetextdeg' . $texti])) { if (('' . urldecode($_POST['pdfrotatetextdeg' . $texti])) == '') { $outputpdf->Text($ourx,$oury,relopi($str_is[$ii],$opi)); if (isset($_POST['pdfrotatetextdeg'])) { $_POST['pdfrotatetextdeg']="0"; // because means "from here on" } } else { $outputpdf->TextWithRotation($ourx,$oury,relopi($str_is[$ii],$opi),$_POST['pdfrotatetextdeg' . $texti],0); if (isset($_POST['pdfrotatetextdeg'])) { $_POST['pdfrotatetextdeg']=$_POST['pdfrotatetextdeg' . $texti]; // bdecause means "from here on" $xfsz=sin(floatval($_POST['pdfrotatetextdeg' . $texti]) * pi() / 180.0) * floatval($fsz); $yfsz=cos(floatval($_POST['pdfrotatetextdeg' . $texti]) * pi() / 180.0) * floatval($fsz); } else { $orot=$_POST['pdfrotatetextdeg' . $texti]; $xfsz=sin(floatval($orot) * pi() / 180.0) * floatval($fsz); $yfsz=cos(floatval($orot) * pi() / 180.0) * floatval($fsz); } } } else if ($odir != "") { //file_put_contents('xxxx.xx',$odir . ' for ' . $texti); $outputpdf->TextWithDirection($ourx,$oury,relopi($str_is[$ii],$opi),$odir); if ($odir == "U") { $xfsz=floatval($fsz); $yfsz=0; } else if ($odir == "D") { $xfsz=-floatval($fsz); $yfsz=0; } } else if (isset($_POST['pdfdirectiontext'])) { //file_put_contents('xxxxx.xx',$_POST['pdfdirectiontext'] . ' For ' . $texti); $outputpdf->TextWithDirection($ourx,$oury,relopi($str_is[$ii],$opi),$_POST['pdfdirectiontext']); if ($_POST['pdfdirectiontext'] == "U") { $xfsz=floatval($fsz); $yfsz=0; } else if ($_POST['pdfdirectiontext'] == "D") { $xfsz=-floatval($fsz); $yfsz=0; } } else if ($orot != "") { $outputpdf->TextWithRotation($ourx,$oury,relopi($str_is[$ii],$opi),$orot,0); } else if (isset($_POST['pdfrotatetextdeg'])) { $outputpdf->TextWithRotation($ourx,$oury,relopi($str_is[$ii],$opi),$_POST['pdfrotatetextdeg'],0); $xfsz=sin(floatval($_POST['pdfrotatetextdeg']) * pi() / 180.0) * floatval($fsz); $yfsz=cos(floatval($_POST['pdfrotatetextdeg']) * pi() / 180.0) * floatval($fsz); } else { if (1 == 8 && strpos($str_is[$ii], "\n") !== false) { $outputpdf->SetXY($ourx,$oury); //,''); $outputpdf->Write($fsz, html_entity_decode(relopi($str_is[$ii],$opi))); } else { $outputpdf->Text($ourx,$oury,relopi($str_is[$ii],$opi)); } } $ourx+=$xfsz; $oury+=$yfsz; } } $texti++; $fsz=$ofsz; $fst=$ofst; } } } } // End of text loop if (file_exists('./' . $ourfname . '.pdf')) { unlink('./' . $ourfname . '.pdf'); } if ($blanks == "") { savefcmds(""); } $outputpdf->Output("./" . $ourfname . ".pdf", "F"); unset($outputpdf); $result = 0; if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { exec( "/usr/local/cpanel/3rdparty/bin/convert -density 300 " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfname . ".pdf " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfname . ".jpg"); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } else { exec( $convertcommand . "-density 300 " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfname . ".pdf " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfname . ".jpg"); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } if (sizeof($datauris) > 1) { //echo "ourfname=" . $ourfname . ' ... ' . $afterjpg; //exit; if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') === false) { if (1 == 1) { $afterjpg.=" ; open " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfname . "-0.pdf"; } } } if ($afterjpg != "") { //} && sizeof($datauris) <= 1) { //file_put_contents('za.za', $afterjpg); exec($afterjpg); if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { file_put_contents('bad2.bad2', ''); } if (file_exists('bad2.bad2') && strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { if (('' . ourfilesize('bad2.bad2')) != '1' && ('' . ourfilesize('bad2.bad2')) != '2') { $outputpdf = new RPDF('P','pt'); wildout(dirname(__FILE__) . DIRECTORY_SEPARATOR . explode('-',$ourfname)[0] . "-*.jpg", dirname(__FILE__) . DIRECTORY_SEPARATOR . explode('-',$ourfname)[0] . "-0.pdf"); while (('' . ourfilesize('bad2.bad2')) != '1' && ('' . ourfilesize('bad2.bad2')) != '2') { sleep(5); //file_put_contents('bad5.bad5', ('' . ourfilesize('bad2.bad2')) . $_SERVER['HTTP_USER_AGENT']); } } //exit; } } $user_agent = $_SERVER['HTTP_USER_AGENT']; if (strpos( $user_agent, 'Safari') !== false && strpos( $user_agent, 'Chrome') === false && strpos( $user_agent, 'OPR') === false && strpos( $user_agent, 'Firefox') === false && strpos( $user_agent, 'Opera') === false) { if (1 == 1) { $wobit="window.open('/" . $ourfname . ".pdf','_blank');"; echo ''; } else { header('Content-Type: application/pdf'); echo file_get_contents('./' . $ourfname . '.pdf'); exec($safarisharehtmlbit); } } else { $psfx=""; if (sizeof($datauris) > 1 && 1 == 7) { if (file_exists($ourfname . '-0.pdf')) { $psfx="-0"; } } echo '
' . "\n" . '
' . $sharehtmlbit . '
'; } exit; } else if (isset($_GET['pdfimageplustext'])) { $w=0; $h=0; $outputpdf = new RPDF('P','pt'); //if (isset($_GET['pdfrtext']) && isset($_GET['pdfgtext']) && isset($_GET['pdfbtext'])) { //$outputpdf->SetTextColor(urldecode($_GET['pdfrtext']), urldecode($_GET['pdfgtext']), urldecode($_GET['pdfbtext'])); //} $outputpdf->SetTopMargin(0.0); //$outputpdf->AddPage('L'); if (isset($_GET['pdfimage'])) { if (strpos(urldecode($_GET['pdfimage']), "data:image/") !== false && strpos(urldecode($_GET['pdfimage']), ";base64,") !== false) { $fname='./' . $ourfname . '.' . strtolower(explode(";", explode("data:image/", urldecode($_GET['pdfimage']))[1])[0]); file_put_contents($fname, base64_decode(str_replace(' ','+',explode(";base64,", urldecode($_GET['pdfimage']))[1]))); list($w, $h) = getimagesize($fname); if ($w > $h) { $outputpdf->AddPage('L', 'A4'); if ($w > 830) { $scale=floatval(830.0 / $w); $scalep=floatval($scale * 100.0); //$outputpdf->_out('q'); //Scale(floatval($scalep), floatval($scalep)); $newh=($h * (830.0 / $w)); $outputpdf->Image($fname, 0, 0, 830, floatval($newh)); //, 33.78); //$outputpdf->_out('Q'); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } else { $outputpdf->AddPage('P', 'A4'); if ($h > 830) { $scale=floatval(830.0 / $h); $scalep=floatval($scale * 100.0); //Scale(floatval($scalep), floatval($scalep)); $neww=($w * (830.0 / $h)); $outputpdf->Image($fname, 0, 0, floatval($neww), 830); //, 33.78); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } } else if (strpos(urldecode($_GET['pdfimage']), "rjmprogramming.com.au/") !== false) { $fname="./" . explode(')',explode('"',explode("rjmprogramming.com.au/", urldecode($_GET['pdfimage']))[1])[0])[0]; //$outputpdf->Image("./" . explode("rjmprogramming.com.au/", urldecode($_GET['pdfimage']))[1], 0, 0); //, 33.78); list($w, $h) = getimagesize($fname); if ($w > $h) { $outputpdf->AddPage('L', 'A4'); if ($w > 830) { $scale=floatval(830.0 / $w); $scalep=floatval($scale * 100.0); //$outputpdf->_out('q'); //Scale(floatval($scalep), floatval($scalep)); $newh=($h * (830.0 / $w)); $outputpdf->Image($fname, 0, 0, 830, floatval($newh)); //, 33.78); //$outputpdf->_out('Q'); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } else { $outputpdf->AddPage('P', 'A4'); if ($h > 830) { $scale=floatval(830.0 / $h); $scalep=floatval($scale * 100.0); //Scale(floatval($scalep), floatval($scalep)); $neww=($w * (830.0 / $h)); $outputpdf->Image($fname, 0, 0, floatval($neww), 830); //, 33.78); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } } else { if (strpos(urldecode($_GET['pdfimage']), 'url(') !== false) { $fname=str_replace('"','',explode(')',explode('url(',urldecode($_GET['pdfimage']))[1])[0]); } else { $fname=urldecode($_GET['pdfimage']); } //$outputpdf->Image(urldecode($_GET['pdfimage']), 0, 0); //, 33.78); list($w, $h) = getimagesize($fname); if ($w > $h) { $outputpdf->AddPage('L', 'A4'); if ($w > 830) { $scale=floatval(830.0 / $w); $scalep=floatval($scale * 100.0); //$outputpdf->_out('q'); //Scale(floatval($scalep), floatval($scalep)); $newh=($h * (830.0 / $w)); $outputpdf->Image($fname, 0, 0, 830, floatval($newh)); //, 33.78); //$outputpdf->_out('Q'); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } else { $outputpdf->AddPage('P', 'A4'); if ($h > 830) { $scale=floatval(830.0 / $h); $scalep=floatval($scale * 100.0); //Scale(floatval($scalep), floatval($scalep)); $neww=($w * (830.0 / $h)); $outputpdf->Image($fname, 0, 0, floatval($neww), 830); //, 33.78); } else { $outputpdf->Image($fname, 0, 0); //, 33.78); } } } } else { $outputpdf->AddPage('L','A4'); } if (isset($_GET['pdftext1'])) { $texti=1; $ffy='Arial'; $fst='B'; $fsz=16; if (isset($_GET['pdffamily'])) { $ffy=str_replace('+',' ',urldecode($_GET['pdffamily'])); } if (isset($_GET['pdffontstyle'])) { $fst=str_replace('N',' ',substr(strtoupper(str_replace('+',' ',urldecode($_GET['pdffontstyle']))) . ' ',0,1)); } if (isset($_GET['pdffontsize'])) { if (strlen(trim(str_replace('+',' ',urldecode($_GET['pdffontsize'])))) > 0) { $fsz=str_replace('+',' ',urldecode($_GET['pdffontsize'])); } } $ofsz=$fsz; $ofsz=$fst; while (isset($_GET['pdftext' . $texti]) && isset($_GET['pdfx' . $texti]) && isset($_GET['pdfy' . $texti])) { $exc="~"; if (strpos(urldecode($_GET['pdfx' . $texti]), '.') !== false && strpos(urldecode($_GET['pdfy' . $texti]), '.') === false) { $fsz=explode('.', urldecode($_GET['pdfx' . $texti]))[1]; if (substr('' . $fsz . ' ',4) == '0000') { $fst='B'; $fsz=substr($fsz,4); if ($fsz == '') { $fsz=$ofsz; } } else if (substr('' . $fsz . ' ',3) == '000') { $fst='U'; $fsz=substr($fsz,3); if ($fsz == '') { $fsz=$ofsz; } } else if (substr('' . $fsz . ' ',2) == '00') { $fst='I'; $fsz=substr($fsz,2); if ($fsz == '') { $fsz=$ofsz; } } else if (substr('' . $fsz . ' ',1) == '0') { $fst=' '; $fsz=substr($fsz,1); if ($fsz == '') { $fsz=$ofsz; } } $exc="."; } if (strlen(trim(urldecode($_GET['pdftext' . $texti]))) > 0) { //echo "yesooo"; //exit; $outputpdf->SetFont($ffy,trim($fst),$fsz); $ourx=floatval($scale * floatval(explode($exc, urldecode($_GET['pdfx' . $texti]))[0])); $oury=floatval($scale * floatval(urldecode($_GET['pdfy' . $texti]))); $stris=str_replace('^%&',' + ',str_replace('+',' ',str_replace('+++','^%&',urldecode($_GET['pdftext' . $texti])))); if (isset($_GET['pdfrtext' . $texti]) && isset($_GET['pdfgtext' . $texti]) && isset($_GET['pdfbtext' . $texti])) { $outputpdf->SetTextColor(urldecode($_GET['pdfrtext' . $texti]), urldecode($_GET['pdfgtext' . $texti]), urldecode($_GET['pdfbtext' . $texti])); if (isset($_GET['pdfrtext'])) { // because means "from here on" $_GET['pdfrtext']=$_GET['pdfrtext' . $texti]; $_GET['pdfgtext']=$_GET['pdfgtext' . $texti]; $_GET['pdfbtext']=$_GET['pdfbtext' . $texti]; } } else if (isset($_GET['pdfrtext']) && isset($_GET['pdfgtext']) && isset($_GET['pdfbtext'])) { $outputpdf->SetTextColor(urldecode($_GET['pdfrtext']), urldecode($_GET['pdfgtext']), urldecode($_GET['pdfbtext'])); } if (isset($_GET['pdfdirectiontext' . $texti])) { if (strlen($_GET['pdfdirectiontext' . $texti]) == 0) { $outputpdf->Text($ourx,$oury,$stris); if (isset($_GET['pdfdirectiontext'])) { $_GET['pdfdirectiontext']="L"; // because means "from here on" } } else { $outputpdf->TextWithDirection($ourx,$oury,$stris,$_GET['pdfdirectiontext' . $texti]); if (isset($_GET['pdfdirectiontext'])) { $_GET['pdfdirectiontext']=$_GET['pdfdirectiontext' . $texti]; // because means "from here on" } } } else if (isset($_GET['pdfrotatetextdeg' . $texti])) { if (strlen($_GET['pdfrotatetextdeg' . $texti]) == 0) { $outputpdf->Text($ourx,$oury,$stris); if (isset($_GET['pdfrotatetextdeg'])) { $_GET['pdfrotatetextdeg']="0"; // because means "from here on" } } else { $outputpdf->TextWithRotation($ourx,$oury,$stris,$_GET['pdfrotatetextdeg' . $texti],0); if (isset($_GET['pdfrotatetextdeg'])) { $_GET['pdfrotatetextdeg']=$_GET['pdfrotatetextdeg' . $texti]; // bdecause means "from here on" } } } else if (isset($_GET['pdfdirectiontext'])) { $outputpdf->TextWithDirection($ourx,$oury,$stris,$_GET['pdfdirectiontext']); } else if (isset($_GET['pdfrotatetextdeg'])) { $outputpdf->TextWithRotation($ourx,$oury,$stris,$_GET['pdfrotatetextdeg'],0); } else { $outputpdf->Text($ourx,$oury,$stris); } } $texti++; $fsz=$ofsz; $fst=$ofst; } } if (file_exists('./' . $ourfname . '.pdf')) { unlink('./' . $ourfname . '.pdf'); } savefcmds(""); $outputpdf->Output("./" . $ourfname . ".pdf", "F"); unset($outputpdf); $result = 0; if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { exec( "/usr/local/cpanel/3rdparty/bin/convert -density 300 " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfname . ".pdf " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfname . ".jpg"); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } else { exec( $convertcommand . "-density 300 " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfname . ".pdf " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfname . ".jpg"); //, null, $result ); // Thanks to https://stackoverflow.com/questions/8624886/pdf-to-jpg-conversion-using-php } if (sizeof($datauris) > 1) { //echo "ourfname=" . $ourfname . ' ... ' . $afterjpg; //exit; if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') === false) { $afterjpg.=" ; open " . dirname(__FILE__) . DIRECTORY_SEPARATOR . $ourfname . "-0.pdf"; } } if ($afterjpg != "") { //file_put_contents('xa.xa', $afterjpg); exec($afterjpg); if (strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { file_put_contents('bad2.bad2', ''); } if (file_exists('bad2.bad2') && strpos($_SERVER['SERVER_NAME'], 'rjmprogramming.com.au') !== false) { if (('' . ourfilesize('bad2.bad2')) != '1' && ('' . ourfilesize('bad2.bad2')) != '2') { $outputpdf = new RPDF('P','pt'); wildout(dirname(__FILE__) . DIRECTORY_SEPARATOR . explode('-',$ourfname)[0] . "-*.jpg", dirname(__FILE__) . DIRECTORY_SEPARATOR . explode('-',$ourfname)[0] . "-0.pdf"); while (('' . ourfilesize('bad2.bad2')) != '1' && ('' . ourfilesize('bad2.bad2')) != '2') { sleep(5); //file_put_contents('bad6.bad6', ('' . ourfilesize('bad2.bad2')) . $_SERVER['HTTP_USER_AGENT']); } } //exit; } } $user_agent = $_SERVER['HTTP_USER_AGENT']; if (strpos( $user_agent, 'Safari') !== false && strpos( $user_agent, 'Chrome') === false && strpos( $user_agent, 'OPR') === false && strpos( $user_agent, 'Firefox') === false && strpos( $user_agent, 'Opera') === false) { if (1 == 1) { $wobit="window.open('/" . $ourfname . ".pdf','_blank');"; echo '' . $sharehtmlbit . ''; } else { header('Content-Type: application/pdf'); echo file_get_contents('./' . $ourfname . '.pdf'); exec($safarisharehtmlbit); } } else { $psfx=""; if (sizeof($datauris) > 1 && 1 == 7) { $psfx="-0"; } echo '
' . "\n" . '
' . $sharehtmlbit . '
'; } exit; } ?>