1) { if (strpos($argv[0], '_python') !== false) { $chartprefix=explode('/', explode('_python', $argv[0])[0])[-1 + sizeof(explode('/', explode('_python', $argv[0])[0]))]; } } } else if (isset($_SERVER['REQUEST_URI'])) { foreach (glob(dirname(__FILE__) . DIRECTORY_SEPARATOR . '*_python.py') as $filename) { $bname=explode(".py", basename($filename))[0]; if (strpos(',' . $posthlist . ',', ',' . str_replace('_','',$bname) . ',') === false) { if ($posthone == '') { $thisoptih=''; for ($jj=0; $jj++"; } else { $thisoptih=''; for ($jj=0; $jj", "", $posthone); } } } if (strpos($pothlist, ',') === false) { $posthone=""; } if (strpos($_SERVER['REQUEST_URI'], '_python') !== false) { if (strpos($_SERVER['SERVER_NAME'], 'localhost') !== false) { $islocal=true; } $chartprefix=explode('/', explode('_python', $_SERVER['REQUEST_URI'])[0])[-1 + sizeof(explode('/', explode('_python', $_SERVER['REQUEST_URI'])[0]))]; } } if ($chartprefix != '') { $words=explode('_', $chartprefix); $chartname=strtoupper(substr($words[0],0,1)) . strtolower(substr($words[0],1)); for ($iw=1; $iw 1) { return explode('.py',explode($chartnoblanks . '_', $argv[-1 + $argc])[-1 + sizeof(explode($chartnoblanks . '_', $argv[-1 + $argc]))])[0]; } } $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'])) { $notpost='POST'; if (urldecode($_POST['outfile']) != "") { $stfle=' '; return urldecode($_POST['outfile']); } } if (isset($_GET['parentipaddr'])) { return str_replace('+',' ',urldecode($_GET['parentipaddr'])); } return str_replace(":", "_", $rma); } if (php_sapi_name() === 'cli') { if (file_exists('/usr/local/bin/python3')) { $command = '/usr/local/bin/python3 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartnoblanks . '_' . server_remote_addr() . '.py ' . dirname(__FILE__) . DIRECTORY_SEPARATOR; // Your command } else if (file_exists('/bin/python3')) { $command = '/bin/python3 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartnoblanks . '_' . server_remote_addr() . '.py ' . dirname(__FILE__) . DIRECTORY_SEPARATOR; // Your command } else if (file_exists('/bin/python')) { $command = '/bin/python ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartnoblanks . '_' . server_remote_addr() . '.py ' . dirname(__FILE__) . DIRECTORY_SEPARATOR; // Your command } else if (file_exists('/usr/local/bin/python')) { $command = '/usr/local/bin/python ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartnoblanks . '_' . server_remote_addr() . '.py ' . dirname(__FILE__) . DIRECTORY_SEPARATOR; // Your command } else { $command = 'python ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartnoblanks . '_' . server_remote_addr() . '.py ' . dirname(__FILE__) . DIRECTORY_SEPARATOR; // Your command } if (1 == 1) { //file_put_contents('xxxxx.xxxxx', server_remote_addr()); //file_put_contents('xxxx.xxxx', $command); exec($command); // . '; rm -f ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartnoblanks . '_' . server_remote_addr() . '.py'); } else { // Open the process pointer for reading $handle = popen($command, 'r'); if ($handle) { // Read and output the buffer until the end of the file while (!feof($handle)) { echo fread($handle, 2048); flush(); // Send it to the browser immediately } pclose($handle); } } exit; } else if (strpos(str_replace('&rand=','',str_replace('&title=','',str_replace('&labels=','',str_replace('?','',$_SERVER['QUERY_STRING'])))), '&') === false) { $serverremoteaddr='_' . server_remote_addr(); $waspy=file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . (1 == 11 ? $chartprefix : 'pie_chart') . '_python.py'); //file_put_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'xxxxxx.xxxxxx', $waspy); if (strpos($waspy, "nums = []") !== false) { //file_put_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'xxxxxx.xxxxxx2', $waspy); $waspy=str_replace("img.load()","#img.load()",$waspy); $waspy=str_replace("img.show()","#img.show()",$waspy); $waspy=str_replace("with Image.open(","#with Image.open(",$waspy); if (isset($_GET['array'])) { $serverremoteaddr='_' . server_remote_addr(); $okdef= str_replace('+',' ',urldecode($_GET['array'])); //file_put_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'xxxxxx.xxxxxx3', str_replace("nums = []","nums = [" . str_replace('+',' ',urldecode($_GET['array'])) . "]",$waspy)); if (isset($_GET['title'])) { $oktdef=str_replace('+',' ',urldecode($_GET['title'])); $waspy=str_replace('mytitle = ""','mytitle = "' . str_replace('"','`',$oktdef) . '"',$waspy); if (strpos($oktdef, "'") !== false) { $labtdelim='"'; } if (strpos($oktdef, $labtdelim) !== false) { $oktdef=str_replace($labtdelim, "`", $oktdef); } } if (isset($_GET['labels'])) { $getlb=str_replace('+',' ',urldecode($_GET['labels'])); $otherlb=''; if (strpos($getlb, ",") !== false) { if (strpos($getlb, "','") === false && strpos($getlb, '","') === false) { $getlb=('"' . str_replace(',','","',str_replace('"','`',$getlb)) . '"'); $wds=explode('","', substr($getlb,1,(-2 + strlen($getlb)))); for ($ii=0; $ii " . $chartname . " - Python Matplotlib - RJM Programming - September, 2026

" . $chartname . $posthone . "

Using Python Matplotlib

RJM Programming - September, 2026







"; exit; } } if (file_exists('/Applications/MAMP/bin/php/php7.4.33/bin/php')) { exec('cd ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . ' ; /Applications/MAMP/bin/php/php7.4.33/bin/php -n ./' . $chartprefix . '_python.php > /dev/null 2> /dev/null ; open ./plot' . $serverremoteaddr . '.png'); } else { exec('cd ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . ' ; ksh -c "' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartprefix . '_python.ksh ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartprefix . '_python.php ' . '_' . server_remote_addr() . ' ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartnoblanks . '_' . server_remote_addr() . '.py"'); exec('chmod 777 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartnoblanks . '_' . server_remote_addr() . '.py'); } if ($islocal) { sleep(3); } else { while (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $chartnoblanks . '_' . server_remote_addr() . '.py')) { sleep(3); } } } if (strpos("~" . $chartname, "~Column") !== false) { $thingo=" axis"; $sper=" Y values"; $stle=" X labels"; } else if (strpos("~" . $chartname, "~Bar") !== false) { $thingo=" axis"; $sper=" X values"; $stle=" Y labels"; } echo " " . $chartname . " - Python Matplotlib - RJM Programming - September, 2026

" . $chartname . $posthone . "

Using Python Matplotlib

RJM Programming -
September, 2026







"; ?>