Koden for den side der laver billedet, ser således ud, hvis det skulle hjælpe :D
<?php
$navn = strip_tags($navn);
$text = strip_tags($text);
$size = strip_tags($size);
$skra = strip_tags($skra);
$font = strip_tags($font);
if ($font == "arial"){
$type = getcwd().'/arial.ttf';}
elseif ($font == "arial2"){
$type = getcwd().'/arial2.ttf';}
elseif ($font == "augie"){
$type = getcwd().'/augie.ttf';}
elseif ($font == "BEHR____"){
$type = getcwd().'/BEHR____.ttf';}
elseif ($font == "bluebaby"){
$type = getcwd().'/bluebaby.ttf';}
elseif ($font == "comic"){
$type = getcwd().'/comic.ttf';}
elseif ($font == "julesgirltalk"){
$type = getcwd().'/julesgirltalk.ttf';}
elseif ($font == "Lindl___"){
$type = getcwd().'/Lindl___.ttf';}
elseif ($font == "Neverwinter"){
$type = getcwd().'/Neverwinter.ttf';}
elseif ($font == "oogieboogie"){
$type = getcwd().'/oogieboogie.ttf';}
elseif ($font == "Pokemon"){
$type = getcwd().'/Pokemon.ttf';}
elseif ($font == "times"){
$type = getcwd().'/times.ttf';}
elseif ($font == "alien"){
$type = getcwd().'/alien.ttf';}
elseif ($font == "hmua"){
$type = getcwd().'/hmua.ttf';}
elseif ($font == "GFH_nml"){
$type = getcwd().'/GFH_nml.ttf';}
else {
$type = getcwd().'/arial.ttf';}
$frasiden = strip_tags($frasiden);
$fratop = strip_tags($fratop);
$text = stripslashes($text);
$text = str_replace("+"," ", $text);
$text = str_replace('
', '\n\r', $text);
$im = imagecreatefromjpeg("$navn.jpg");
ImageTTFText ($im, $size, $skra, $frasiden, $fratop, $farve, $type, "$text");
imagejpeg($im);
ImageDestroy ($im);
?>
og siden der henter den ser således ud:
<?php
mysql_connect("localhost", "goog_dk", "63nSfe.a");
mysql_select_db("goog_dk");
function InsertUser() {
global $REMOTE_ADDR, $HTTP_USER_AGENT, $PHP_SELF;
$ip = $REMOTE_ADDR;
$host = gethostbyaddr($ip);
$browser = $HTTP_USER_AGENT;
$page = $PHP_SELF;
$time = explode(" ", microtime());
$usersec = (double)$time[1];
mysql_query("DELETE FROM online_users WHERE ip like '$ip'");
mysql_query("INSERT INTO online_users (ip,host,date,browser,page) VALUES ('$ip','$host','$usersec','$browser','$page')");
}
InsertUser();
?><html><head><link href=snorre.css rel=stylesheet><title>goog.dk - Make you own pics.</title></head>
<body>
<?php
$id = strip_tags($id);
$query = mysql_query("select * from pics2 WHERE id = '$id' order by id") or die(mysql_error());
while($row = mysql_fetch_array($query)){
$navn = $row[navn];
$text = $row[text];
$size = $row[size];
$font = $row[font];
$frasiden = $row[frasiden];
$fratop = $row[fratop];
$skra = $row[skra];
}
require("db_ind.inc");
$sql = "UPDATE pics SET dl = dl+1 WHERE navn = '$navn'";
mysql_query($sql) or die (mysql_error());
$text = stripslashes($text);
$text = urlencode($text);
$text = str_replace(" "," ", nl2br(htmlentities(addslashes($text))));
$text = str_replace("%5C","", $text);
echo "<img src='picgen2.php?text=$text&size=$size&navn=$navn&frasiden=$frasiden&fratop=$fratop&skra=$skra&font=$font'>";
?><br>
<a href=http://www.goog.dk/pic target=_top>GooG.dk/pic</a> - To make your own picture!! -
<a href=http://www.goog.dk/portal/online2.php target=_top>
<?PHP
mysql_connect("localhost", "goog_dk", "63nSfe.a");
mysql_select_db("goog_dk");
function ShowUsers2() {
$time = explode(" ", microtime());
$usersec = (double)$time[1];
mysql_query("DELETE FROM online_users WHERE date < $usersec -400");
$countusers = mysql_fetch_array(mysql_query("SELECT count(*) as total FROM online_users"));
print ('Online: <b>'.$countusers[total].'</b>');
}
showUsers2();
?></a>
<script language="javascript1.2" src="
http://stat02.cliche.parameter.dk/counter/12b2a37f1b29a694bd44d48c17bfe3f0"></script></body></html>