", "\n", $htis)));
} else {
file_put_contents($fidea, str_replace('tutorial_to_animated_gif.php',$fidea,$htis));
}
$_SESSION['refreshname']=$fidea;
$_SESSION['refreshcontents']=file_get_contents($fidea);
file_put_contents('lastrefresh.txt', $_SESSION['refreshname'] . '~!~' . $_SESSION['refreshcontents']);
file_put_contents($fidea, $htis);
} else {
file_put_contents(explode('~!~', $lrc)[0], explode('~!~', $lrc)[1]);
}
}
}
}
if (isset($_SESSION['refreshname']) && isset($_SESSION['refreshcontents'])) {
//file_put_contents('amn.amn', $_SESSION['refreshname']);
if (!file_exists($_SESSION['refreshname'])) {
file_put_contents($_SESSION['refreshname'], $_SESSION['refreshcontents']);
}
} else if (file_exists('lastrefresh.txt')) {
$lrc=@file_get_contents('lastrefresh.txt');
if (strpos($lrc, '~!~') !== false) { // && strpos($lrc, str_replace(' ',' + ',str_replace('+',' ',urldecode($_GET['irefresh'])))) !== false) {
//file_put_contents('bmn.bmn', explode('~!~', $lrc)[0]);
if (!file_exists(explode('~!~', $lrc)[0])) {
file_put_contents(explode('~!~', $lrc)[0], explode('~!~', $lrc)[1]);
}
}
}
if (strlen($_GET['irefresh']) > 0) {
echo "
";
} else if (isset($_GET['idelay'])) {
//sleep($_GET['idelay']);
$isofar=0;
$sparegifdone=false;
while ($isofar < $_GET['idelay']) {
if (file_exists('lastrefresh.txt')) {
$lrc=@file_get_contents('lastrefresh.txt');
if (strpos($lrc, '~!~') !== false) { // && strpos($lrc, str_replace(' ',' + ',str_replace('+',' ',urldecode($_GET['irefresh'])))) !== false) {
//file_put_contents('dmn.dmn', explode('~!~', $lrc)[0]);
if (!file_exists(explode('~!~', $lrc)[0])) {
file_put_contents(explode('~!~', $lrc)[0], explode('~!~', $lrc)[1]);
}
}
}
sleep(1);
if ($isofar == 0) {
foreach (glob(tmpidea(sys_get_temp_dir() . DIRECTORY_SEPARATOR) . "agifslide*.*") as $dggfilename) {
if (!$sparegifdone) {
$sparegifdone=true;
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "agif_slide.gif")) {
unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "agif_slide.gif");
}
if (file_exists("/usr/local/cpanel/3rdparty/bin/convert")) {
exec("/usr/local/cpanel/3rdparty/bin/convert -delay " . trim($dly) . "0 -quality 95 " . tmpidea(sys_get_temp_dir() . DIRECTORY_SEPARATOR) . "agifslide*.* " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "agif_slide.gif");
} else if (PHP_OS == "Darwin") {
exec("/usr/local/bin/convert -delay " . trim($dly) . "0 -quality 95 " . tmpidea(sys_get_temp_dir() . DIRECTORY_SEPARATOR) . "agifslide*.* " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "agif_slide.gif");
} else {
exec("magick.exe -delay " . trim($dly) . "0 -quality 95 " . tmpidea(sys_get_temp_dir() . DIRECTORY_SEPARATOR) . "agifslide*.* " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "agif_slide.gif");
}
}
unlink($dggfilename);
}
}
$isofar++;
}
}
exit;
} else if (isset($_GET['refresh'])) {
//file_put_contents('nn.nu', '');
session_start();
$htis=str_replace(' ',' + ',str_replace('+',' ',urldecode($_GET['refresh'])));
if (strpos($htis, "URL='") !== false) {
$hts=explode("URL='", $htis);
for ($ikm=1; $ikm", "\n", $htis)));
} else {
file_put_contents($fidea, str_replace('tutorial_to_animated_gif.php',$fidea,$htis));
}
$_SESSION['refreshname']=$fidea;
$_SESSION['refreshcontents']=file_get_contents($fidea);
file_put_contents('lastrefresh.txt', $_SESSION['refreshname'] . '~!~' . $_SESSION['refreshcontents']);
echo file_get_contents($fidea); //header('Location: ./' . $fidea);
htisidea($htis);
exit;
} else if (isset($_POST['refresh'])) {
//file_put_contents('nn.nq','');
session_start();
$htis=str_replace(' ',' + ',str_replace('+',' ',urldecode($_POST['refresh'])));
if (strpos($htis, "URL='") !== false) {
$hts=explode("URL='", $htis);
for ($ikm=1; $ikm", "\n", $htis)));
} else {
file_put_contents($fidea, str_replace('tutorial_to_animated_gif.php',$fidea,$htis));
}
//file_put_contents('nn.nn', $htis);
//file_put_contents('nn.oo', $fidea);
$_SESSION['refreshname']=$fidea;
$_SESSION['refreshcontents']=file_get_contents($fidea);
file_put_contents('lastrefresh.txt', $_SESSION['refreshname'] . '~!~' . $_SESSION['refreshcontents']);
echo $fidea;
//header('Location: ./' . $fidea);
htisidea($htis);
exit;
} else if (isset($_GET['defresh'])) {
$sparegifdone=false;
$dly="1";
if (isset($_GET['idelay'])) { $dly=str_replace('+','',urldecode($_GET['idelay'])); }
if (1 == 1) {
foreach (glob("outtemp*.htm") as $dggfilename) {
unlink($dggfilename);
}
foreach (glob(tmpidea(sys_get_temp_dir() . DIRECTORY_SEPARATOR) . "agifslide*.*") as $dggfilename) {
if (!$sparegifdone) {
$sparegifdone=true;
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . "agif_slide.gif")) {
unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "agif_slide.gif");
}
if (file_exists("/usr/local/cpanel/3rdparty/bin/convert")) {
exec("/usr/local/cpanel/3rdparty/bin/convert -delay " . trim($dly) . "0 -quality 95 " . tmpidea(sys_get_temp_dir() . DIRECTORY_SEPARATOR) . "agifslide*.* " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "agif_slide.gif");
} else if (PHP_OS == "Darwin") {
exec("/usr/local/bin/convert -delay " . trim($dly) . "0 -quality 95 " . tmpidea(sys_get_temp_dir() . DIRECTORY_SEPARATOR) . "agifslide*.* " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "agif_slide.gif");
} else {
exec("magick.exe -delay " . trim($dly) . "0 -quality 95 " . tmpidea(sys_get_temp_dir() . DIRECTORY_SEPARATOR) . "agifslide*.* " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "agif_slide.gif");
}
}
unlink($dggfilename);
}
} else {
$doit=true;
//while ($doit) {
$suff="";
$isuff=1;
$fnis="outtemp";
$fidea=$fnis . $suff . ".htm";
while (file_exists($fidea)) {
unlink($fidea);
$suff='' . $isuff;
$fidea=$fnis . $suff . ".htm";
$isuff++;
}
//sleep(60);
//if (file_exists('lastrefresh.txt')) {
// $lrc=@file_get_contents('lastrefresh.txt');
// if (strpos($lrc, '~!~') !== false) { // && strpos($lrc, str_replace(' ',' + ',str_replace('+',' ',urldecode($_GET['irefresh'])))) !== false) {
// file_put_contents('emn.emn', explode('~!~', $lrc)[0]);
// if (!file_exists(explode('~!~', $lrc)[0])) {
// $doit=false;
// unlink('lastrefresh.txt');
// }
// }
//}
//}
}
exit;
}
$omoin=' onmouseover=bithis(this); onmouseout=unbithis(this); ';
$omosin=' onmouseover=spanhover(this); onmouseout=spanunhover(this); onclick=mspanhover(this); ';
$thetemp="/tm" . "p/";
$videopath="";
$immogpath="";
$rettrue="";
$fiext="";
$theztemp=$thetemp;
$impreexe="convert";
if (!is_dir($thetemp) || strpos($thetemp, substr(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR,0,1)) === false) {
$impreexe="magick";
$thetemp=str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, tmpidea(sys_get_temp_dir() . DIRECTORY_SEPARATOR));
$thetemp=str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, str_replace("C:","",$_SERVER['DOCUMENT_ROOT']) . DIRECTORY_SEPARATOR);
//$thetemp=str_replace(substr('\\',0,1),substr('\\',0,1) . substr('\\',0,1),str_replace(substr('/',0,1),substr('\\',0,1),$thetemp));
$theztemp='C:' . str_replace('/', substr('\\',0,1), $thetemp);
$thetemp=str_replace(substr('\\',0,1),substr('\\',0,1) . substr('\\',0,1), substr($theztemp,2));
$fiext=".exe";
$videopath="C:\\PROGRA~1\\IMAGEM~1.0-Q\\";
$immogpath="C:\\PROGRA~1\\IMAGEM~1.0-Q\\";
}
$eeee="y";
$lportbit=":8888";
$prepc="";
function ooo($oneidea, $twoidea) {
if ($oneidea != '') { return $oneidea; }
return $twoidea;
}
function thet($inb) {
if (substr($inb,0,1) == substr("\\",0,1)) { return "C:" . "$inb"; }
return "$inb"; //str_replace("\\\\",substr('\\',0,1),$inb);
}
$user_agent = $_SERVER["HTTP_USER_AGENT"];
function getOS() { // thanks to https://www.daniweb.com/programming/web-development/threads/495588/getting-users-os-info-out-of-server-http-user-agent
global $user_agent, $lportbit;
$os_platform = "win Unknown OS Platform";
$os_array = array(
'/windows nt 10/i' => 'Windows 10',
'/windows nt 6.3/i' => 'Windows 8.1',
'/windows nt 6.2/i' => 'Windows 8',
'/windows nt 6.1/i' => 'Windows 7',
'/windows nt 6.0/i' => 'Windows Vista',
'/windows nt 5.2/i' => 'Windows Server 2003/XP x64',
'/windows nt 5.1/i' => 'Windows XP',
'/windows xp/i' => 'Windows XP',
'/windows nt 5.0/i' => 'Windows 2000',
'/windows me/i' => 'Windows ME',
'/win98/i' => 'Windows 98',
'/win95/i' => 'Windows 95',
'/win16/i' => 'Windows 3.11',
'/macintosh|mac os x/i' => 'Mac OS X',
'/mac_powerpc/i' => 'Mac OS 9',
'/linux/i' => 'Linux',
'/ubuntu/i' => 'Ubuntu',
'/iphone/i' => 'iPhone',
'/ipod/i' => 'iPod',
'/ipad/i' => 'iPad',
'/android/i' => 'Android',
'/blackberry/i' => 'BlackBerry',
'/webos/i' => 'Mobile'
);
foreach ($os_array as $regex => $value) {
if (preg_match($regex, $user_agent)) {
$os_platform = $value;
}
}
return $os_platform;
}
function yourexec($incid) {
global $thetemp, $immogpath, $videopath, $videomidbit;
//if (!file_exists('xy.xy')) { file_put_contents('xy.xy',''); }
if (strpos($thetemp, '/') === false) {
$incid=str_replace(" mv "," copy /Y ",str_replace("/usr/local/bin/", $immogpath, $incid));
if (substr(strtoupper(getOS()),0,3) === 'WIN' && (isset($_POST['video']) || isset($_GET['video']))) {
$incid=str_replace(ggserver_remote_addr() . 'video.mov','ggvideo.mov', $incid);
}
if (strpos($incid, $videomidbit) !== false) {
$incidone=explode(' ' . $videomidbit, $incid)[0];
$incidtwo=str_replace(' -i ', ' -i "C:', $incidone);
$incid=str_replace($incidone,$incidtwo,str_replace(' ' . $videomidbit, '" ' . $videomidbit, $incid));
}
$thets=explode("; ", $incid);
for ($ijh=0; $ijh> ' . $thetemp . 'ggerr.err ; mv ' . $thetemp . 'ggpdftmp.pdf ' . $thetemp . ggserver_remote_addr() . 'pdftmp.pdf');
if (!isset($_POST['justvideotmpthis'])) { exit; }
}
if (isset($_POST['justvideotmpthis'])) {
$videofr=" -r " . (1000 / $delay) . " ";
$videofr=" -r " . (1000 / $delay) . " -filter:v setpts=" . ($delay / 1000) . "*PTS ";
$videomime="video/mp4";
$videoext=".mp4";
$videoie="jpg";
foreach (glob($thetemp . '' . ggserver_remote_addr() . 'tmp*.*g*') as $jimvfilename) {
$videoie='' . explode('.', $jimvfilename)[-1 + sizeof(explode('.', $jimvfilename))];
}
$xvideopref=$thetemp . '' . ggserver_remote_addr() . 'tmp';
$xivideopref=$thetemp . '' . ggserver_remote_addr() . 'tmp';
$xjvideopref=$thetemp . '' . ggserver_remote_addr() . 'tmp';
$videofr=" -framerate 0.1 ";
$videoext=".webm";
$videomime="video/webm";
$videomidbit="-c:v libvpx-vp9 -pix_fmt yuva420p -lossless 1 -c:a copy";
if (strpos($thetemp, '/') !== false) {
$videopath="/usr/local/bin/";
if (file_exists('/usr/local/bin/ffmpeg')) {
$videopath="/usr/local/bin/";
}
}
$videocmd=$videopath . "ffmpeg" . $fiext . " " . $videofr . " -i " . $xivideopref . $prepc . "%03d." . $videoie . " " . $videomidbit . " " . $thetemp . "" . ggserver_remote_addr() . "video" . $videoext . " 2>> " . $thetemp . "ggerr.err ";
$videocmd.="; " . $videopath . "ffmpeg" . $fiext . " -i " . " " . $thetemp . "" . ggserver_remote_addr() . "video" . $videoext . " " . $thetemp . "" . ggserver_remote_addr() . "video.mov";
if (file_exists(thet($thetemp) . '' . ggserver_remote_addr() . 'video.webm')) { unlink($thetemp . '' . ggserver_remote_addr() . 'video.webm'); }
if (file_exists(thet($thetemp) . '' . ggserver_remote_addr() . 'video.mov')) { unlink($thetemp . '' . ggserver_remote_addr() . 'video.mov'); }
//file_put_contents('xxy.xxy', $videocmd);
yourexec($videocmd);
exit;
}
$cbgg=" align='center'>Tutorial Slideshow to Animated GIF ";
$cbgg=" data-align='center'>Tutorial Slideshow to Animated GIF ";
$cbor=" ... or ... ";
if (isset($_GET['calledbygg'])) { $cbgg=">"; $cbor=""; }
$sssblurb="";
$mampelse="";
if (1 == 3) {
if (!isset($_GET['huhv']) && strpos($_SERVER['SERVER_NAME'], 'localhost') === false) {
$huhmamp=@file_get_contents("http://localhost" . $lportbit . "/PHP/animegif/tutorial_to_animated_gif.php");
file_put_contents('qz.zq',$huhmamp);
if (strpos(str_replace('Index of ','Index of
',$huhmamp), '') !== false) {
$mampelse=" else { document.getElementById('imsel').innerHTML+=''; } \n";
} else {
$huhmamp=@file_get_contents("http://localhost" . $lportbit . "/");
if (strpos(str_replace('Index of ','',$huhmamp), '') !== false) {
$mampelse=" else { document.getElementById('imsel').innerHTML+=''; } \n";
} else {
$mampelse=" else { document.getElementById('imsel').innerHTML+=''; } \n";
}
}
}
}
if (strpos($thetemp, '/') !== false) {
$videopath="";
if (file_exists('/usr/local/bin/ffmpeg')) {
$videopath="/usr/local/bin/";
}
}
if (isset($_GET['justcheckamhere'])) {
if (file_exists('amhere.htm')) { if (strpos($_SERVER['SERVER_NAME'], 'localhost') !== false) { unlink('amhere.htm'); } }
if (file_exists('amhere.jpg')) { if (strpos($_SERVER['SERVER_NAME'], 'localhost') !== false) { unlink('amhere.jpg'); } }
echo '