I got a script that convert convert my php string (combination of customized image & text) to image, zip it & popup for download with the scripts

$format=$_REQUEST['format'];
$viewArr = $_SESSION['productArr'];                       //the images in array
$outputarr = $_SESSION['outputArr'];
$pngoutarr = $_SESSION['pngOutputArr'];
$downloadable = 1; 


if($format=='png'){
require_once 'png_output.php';
$downPath = genpng($pngoutarr,$downloadable);
$srting = "&&&&";
echo $downPath.$srting.$downloadable;
}

the png_output.php is below

<?php //0046a
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
?>
 HR+cPxdl0edaCFUkvLwNgaHfob9m+nC6A8alBiiiYMV0dnxwZCuO4NOVyFqEbMxhJfo0cZ5ujJGF
 0NStR0e7/Zclv4/dgOYKMa60VnreK2r3/IkVGSms+tRL3jRBJxZvED/s/bp11Tbn1YRAuefT59gn
 Dlqsk1mTnbs/fsbGn8wH0O8BZULLJH+OsN1870mWvhd69ky86I/FG5mKO5ZLC0SXvOM9LNxWKY3y
 IiD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8AStgq9nfko7z2Oi5jefE
 n406bA8OaYS15540ExzP15g5xywplDDx1aq2wo4dMLQbY6DsoMmFJkFtP04VK0BbUS4258pswo1b
 4EjpSgcNssqseZWTQrryrDrRSzxhnFG6ktXPp4Eohlv2DzDFaA0osl0pJOnxp8bnzoDLuJ9A0slB
 YvyS0g5jz4H0MK51R/+Y8KCwtYVxmqJzo4+EhR3KGnh4IzxTzaw46N0fZzUMKZynjSBEhE2eiWy2
 sm1YbinDgFL/3kynduyc2QFtI+KcWlltUsE3e0+O6qiszvkc7mqWe6bncmVUrOvKrlkGdpWZCTsW
 7DakPhUXUbcnM6zw88ISmA8A8JB8rfFB07MMjQocP87DqXsOQoUTeivUBMG0tp8sUA5X++hCPziz
 fSZzXJ3JdSt5o4NGhrh5qhxshyCCEWCC2+Ams4OjSxuqTtJFuIGjNEqVgvC7z1oRCSqPGEFka0nf
 WEY0Dr1XVi+M9RMLM4hTthmoo1vv9YO0U3W7ju48Xh9Aeyf3a1WZTHfC3i0lnJJsmqcU8IeKZPQR
 EnRFVGXzw0+Y6XRvCQ4u4DKsKwdMHzwcc/Ge20F4ylEQVIKjY6nTK9nx37HDNg4wAg+uaA7lgiOd
 vwDiE2wqXLaor0QhScWs6f4swHfKXhm/PJvdXTH2B3YfA4nOo8HUOpQUh0aO1BYXnb1WU+eiC/h5
 dRBTOYS+lNW4ta0=

and another long script that zips. but is the any scrip to convert $_SESSION['productArr'] into image, save to folder and mysql table.

thanks

Have you thought about using base64 encoding?

<?php
        $im = file_get_contents('filename.gif');
        $imdata = base64_encode($im);      
?> 

not yet,i'll give it a try

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.