I have the following error:
[06-Jun-2005 22:14:01] PHP Parse error: parse error, unexpected $ in /home/chilton/public_html/simg/simg.php on line 63
Code: Select all
<?php
require_once( "e;../inc/header.inc.php"e; );
ob_start();
session_start();
$bgurl = rand(1, 3);
$cmd = $CONVERT;
$cmd .= 'images/bg'.$bgurl.'.jpg';
$cmd .= '-crop 200x35+'. rand(0,180) . '+' . rand(0,315);
$cmd .= '/images/tmp/bg'.$bgurl.'.jpg';
exec($cmd);
$im = "e;images/tmp/bg"e;.$bgurl."e;.jpg"e;;
$chars = array("e;a"e;,"e;A"e;,"e;b"e;,"e;B"e;,"e;c"e;,"e;C"e;,"e;d"e;,"e;D"e;,"e;e"e;,"e;E"e;,"e;f"e;,"e;F"e;,"e;g"e;,"e;G"e;,"e;h"e;,"e;H"e;,"e;i"e;,"e;I"e;,"e;j"e;,"e;J"e;,
"e;k"e;,"e;K"e;,"e;l"e;,"e;L"e;,"e;m"e;,"e;M"e;,"e;n"e;,"e;N"e;,"e;o"e;,"e;O"e;,"e;p"e;,"e;P"e;,"e;q"e;,"e;Q"e;,"e;r"e;,"e;R"e;,"e;s"e;,"e;S"e;,"e;t"e;,"e;T"e;,
"e;u"e;,"e;U"e;,"e;v"e;,"e;V"e;,"e;w"e;,"e;W"e;,"e;x"e;,"e;X"e;,"e;y"e;,"e;Y"e;,"e;z"e;,"e;Z"e;,"e;1"e;,"e;2"e;,"e;3"e;,"e;4"e;,"e;5"e;,"e;6"e;,"e;7"e;,"e;8"e;,"e;9"e;);
$textstr = '';
for ($i = 0, $length = 8; $i < $length; $i++) {
$textstr .= $charsїrand(0, count($chars) - 1)];
}
$hashtext = md5($textstr);
$tmpname = $hashtext.'.jpg';
$_SESSIONї'strSec'] = $hashtext;
$font = "e;arial.ttf"e;;
$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 "e;'.$font.'"e;';
$cmd .= ' -fill "e;#'.$color.'"e;';
$cmd .= ' -pointsize '.$size;
$cmd .= ' -gravity "e;'.$gravity.'"e;';
$cmd .= ' -draw \'text 1,0 "e;'.$textstr.'"e;\'';
$cmd .= ' -rotate '.$angle;
$cmd .= ' /"e;.$im"e;"e;/home/chilton/public_html/simg/images/tmp/"e;.$tmpname;
exec($cmd);
exec("e;rm -f"e;"e;.$im."e;);
header("e;Content-Type: image/jpg"e;);
print fread(fopen("e;/images/tmp/"e;.$tmpname,"e;r"e;"e;), filesize("e;/images/tmp/"e;.$tmpname));
exec(rm -f "e;/home/chilton/public_html/simg/images/tmp/"e;.$tmpname.);
ob_end_flush();
?>Code: Select all
tags when posting php code. Review [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color][/size]