if (isset($_GET['spritename']) && $_GET['spritename'] != "") { $spritename = $_GET['spritename']; } else { if (isset($_POST['spritename']) && $_POST['spritename'] != "") { $spritename = $_POST['spritename']; } } function echoFlush($string) { echo $string . "\n"; flush(); ob_flush(); } // What did we receive ? Spritename has priority. if ($spritename != "") { $drawinginput = getImageStringFromFile($spritename); } echo $drawinginput . "\n"; // Translate all hex into dec $finalstring = ""; $colors = explode(',', $drawinginput); foreach ($colors as $key => $color) { $c = hexdec($color); $finalstring .= $c; $finalstring .= ','; } $finalstring = substr($finalstring, 0, strlen($finalstring) - 1); //echo $finalstring; if (!extension_loaded('dio')) { echoFlush("PHP Direct IO does not appear to be installed."); //$feedbackmessage = "PHP Direct IO does not appear to be installed.";
if (isset($_GET['sometext']) && $_GET['sometext'] != "") { $sometext = $_GET['sometext']; } else { if (isset($_POST['sometext']) && $_POST['sometext'] != "") { $sometext = $_POST['sometext']; } } function echoFlush($string) { echo $string . "\n"; flush(); ob_flush(); } // What did we receive ? Spritename has priority. if ($spritename != "") { $sometext = getImageStringFromFile($spritename); } echo $sometext . "\n"; // Translate all hex into dec $finalstring = ""; $colors = explode(',', $sometext); foreach ($colors as $key => $color) { $c = hexdec($color); $finalstring .= $c; $finalstring .= ','; } $finalstring = substr($finalstring, 0, strlen($finalstring) - 1); //echo $finalstring; if (!extension_loaded('dio')) { echoFlush("PHP Direct IO does not appear to be installed."); //$feedbackmessage = "PHP Direct IO does not appear to be installed.";