index.php
$time = date('h:i A')
if (isset($_POST['submit']))
{
$file = 'content.txt';
$name = trim($_POST['name'])
$message = str_replace("r","",stripslashes(trim($_POST['content'])))
$content = "($time) $name: $messagenn";
$content = explode("n",$content)
krsort($content)
$content = implode("n",$content)
$content .= file_get_contents($file)
$handle = fopen($file, 'w')
fwrite($handle, $content)
fclose($handle)
}
?>
image.php
header ('Content-Type: image/gif')
$file = 'content.txt';
$lines = str_replace("n", '', file($file))
$image = imagecreatefromjpeg('background.jpg')
$background_color = imagecolorallocate($image, 255, 255, 255)
$text_color = imagecolorallocate($image, 0, 0, 0)
$y = 209;
for ($i = 0; $i < count($lines) $i++)
{
$text = wordwrap($lines[$i], floor((imagesx($image)-6)/imagefontwidth(2)), "n", 1)
$text = explode("n", $text)
for ($j = (count($text) - 1) $j >= 0; $j--)
{
imagestring($image, 2, 4, $y, $text[$j], $text_color)
$y -= imagefontheight(2)
}
}
imageline($image,1,0,499,1,$background_color)
imagerectangle($image,0,0,499,199,$text_color)
imagegif($image)
?>
$file = 'content.txt';
$lines = str_replace("n", '', file($file))
$image = imagecreatefromjpeg('background.jpg')
$background_color = imagecolorallocate($image, 255, 255, 255)
$text_color = imagecolorallocate($image, 0, 0, 0)
$y = 209;
for ($i = 0; $i < count($lines) $i++)
{
$text = wordwrap($lines[$i], floor((imagesx($image)-6)/imagefontwidth(2)), "n", 1)
$text = explode("n", $text)
for ($j = (count($text) - 1) $j >= 0; $j--)
{
imagestring($image, 2, 4, $y, $text[$j], $text_color)
$y -= imagefontheight(2)
}
}
imageline($image,1,0,499,1,$background_color)
imagerectangle($image,0,0,499,199,$text_color)
imagegif($image)
?>