Hi all ich habe ein sicherheit images von en script hat das auch mit mein server einstellungen stun weil das wird nicht angeseigt hier ist die code muss ich da für wieder was bei confixx eintsellen ? danke
Server4you pluspower
Server4you pluspower
PHP:
<?php
require_once( "../inc/header.inc.php" );
ob_start();
session_start();
$bgurl = rand(1, 3);
$cmd = $CONVERT;
$cmd .= ' images/bg'.$bgurl.'.png';
$cmd .= ' -crop 200x35+'. rand(0,180) . '+' . rand(0,315);
$cmd .= ' ./images/tmp/bg'.$bgurl.'.png';
exec($cmd);
$im = "images/tmp/bg".$bgurl.".png";
$chars = array("a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J",
"k","K","l","L","m","M","n","N","o","O","p","P","q","Q","r","R","s","S","t","T",
"u","U","v","V","w","W","x","X","y","Y","z","Z","1","2","3","4","5","6","7","8","9");
$textstr = '';
for ($i = 0, $length = 8; $i < $length; $i++) {
$textstr .= $chars[rand(0, count($chars) - 1)];
}
$hashtext = md5($textstr);
$tmpname = $hashtext.'.png';
$_SESSION['strSec'] = $hashtext;
$font = "arial.ttf";
$size = rand(24, 36);
$hexValues = array('0','1','2','3','4');
$numHex = count($hexValues);
$color = '';
for ($i = 0; $i < 6; $i++) {
$color .= $hexValues[rand(0, $numHex-1)];
}
$gravities = array('West', 'Center', 'East');
$gravity = $gravities[rand(0, count($gravities)-1)];
$angle = rand(-10, 10);
$cmd = $CONVERT;
$cmd .= ' -font "'.$font.'"';
$cmd .= ' -fill "#'.$color.'"';
$cmd .= ' -pointsize '.$size;
$cmd .= ' -gravity "'.$gravity.'"';
$cmd .= ' -draw \'text 1,0 "'.$textstr.'"\'';
$cmd .= ' -rotate '.$angle;
$cmd .= ' ./'.$im.' ./images/tmp/'.$tmpname;
exec($cmd);
exec('rm -f "'.$im.'"');
header("Content-Type: image/png");
print fread(fopen('./images/tmp/'.$tmpname, 'r'), filesize('./images/tmp/'.$tmpname));
exec('rm -f "./images/tmp/'.$tmpname.'"');
ob_end_flush();
?>