Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Dynamic Sig - What do you think?


ghost's Avatar
0 0

I did this.. out of pure boredom and how much I wanted a dynamic sig.. it isnt dangerous if an admin would like the code please let me know :) But what do you all think? I made it randomize the bofh excuse script :) Its not quite right yet but im working on it :)


ghost's Avatar
0 0

Nice one darth. I think that vt at the end is a newline character, instead of using newlines, just use another imagestring() command.

I also got bored.


ghost's Avatar
0 0

haha dynamic sig club!


ghost's Avatar
0 0

Darth_Pengo asked to see the coode, so I thought I'd post it here.

$im = ImageCreateFromPng("bg.png");
$txtcol = imagecolorallocate($im, 0, 0, 0);
$string = "Your IP is ".getenv('REMOTE_ADDR');
$iw= imagesx($im); 
$sw = imagefontwidth(5)*strlen($string); 
$sx = ($iw-$sw)/2; 
imagestring($im, 5, $sx, 25, $string, $txtcol);
$string = "Insert generic witty";
$sw = imagefontwidth(5)*strlen($string); 
$sx = ($iw-$sw)/2;
imagestring($im, 5, $sx, 67, $string, $textcol); 
$string = "comment here";
$sw = imagefontwidth(5)*strlen($string); 
$sx = ($iw-$sw)/2;
imagestring($im, 5, $sx, 80, $string, $textcol); 
header("Content-type: image/png");
imagepng($im);
?>	```

ghost's Avatar
0 0

Awesome thanks !

heres mine:

<?php
header("Content-type: image/png");
$dbh=mysql_connect ("localhost", "*", "*") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("*");
$query = "SELECT * FROM <censored> ORDER BY rand() LIMIT 1";
if ($e = mysql_query($query)) {
	while ($row = mysql_fetch_array($e)) {
		$excuse = $row['excuse'];
	}
}
$user = "Darth_Pengo";
$img = imagecreate(600, 100);
$colour = imagecolorallocate($img, 0, 0, 0);
$color2 = imagecolorallocate($img, 255, 255, 255);
imagestring($img, 5, 10, 10, $user, $color2);
imagestring($img, 5, 10, 30, "Bofh Excuse: ", $color2);
imagestring($img, 5, 10, 50, $excuse, $color2);
imagepng($img);
imagedestroy($img);
?>

ghost's Avatar
0 0

EDIT: nvm…


ghost's Avatar
0 0

testing