upgrade on mysqlmanager
This commit is contained in:
20
standalone/build_random_pic_file.php
Executable file
20
standalone/build_random_pic_file.php
Executable file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
$sOutFilePath = 'logo_givaudan_48.php';
|
||||
|
||||
$asResult[] = '<?php';
|
||||
$asResult[] = '';
|
||||
foreach (glob("resize/*_48.png") as $sFileName)
|
||||
{
|
||||
$sImageString = base64_encode(file_get_contents($sFileName));
|
||||
$asImages[] = '\''.str_replace("'", "\'", $sImageString).'\'';
|
||||
}
|
||||
$asResult[] = '$asImages = array('."\t".implode(', '."\n\t\t\t\t\t", $asImages).');';
|
||||
$asResult[] = '';
|
||||
$asResult[] = 'header(\'Content-Type: image/png\');';
|
||||
$asResult[] = 'echo base64_decode($asImages[rand(0, count($asImages)-1)]);';
|
||||
$asResult[] = "\n\n".'?>';
|
||||
|
||||
file_put_contents($sOutFilePath, implode("\n", $asResult));
|
||||
chmod($sOutFilePath, 0777);
|
||||
?>
|
||||
Reference in New Issue
Block a user