phpbb php sig
Posted: Mon Mar 28, 2005 8:31 am
Could anyone give an example of an php image script that i can use in the bbcode at phpbb forums?? Cause i followed some tutorials and it still doesn't work here is the image:

Firefox even says in the title that it is an image!!!!
anywayhere is the code:
.htaccess:
sig.php:
i just don't get it what am i doing wrong??
Firefox even says in the title that it is an image!!!!
anywayhere is the code:
.htaccess:
Code: Select all
AddType application/x-httpd-php .pngCode: Select all
<?php
//db info
$db = "******";
$user_ip = $_SERVER['REMOTE_ADDR'];
$curr_page = $_SERVER['REQUEST_URI'];
//databse connect and getting info
$link = mysql_connect("*****", "******", "*****");
mysql_select_db("*****", $link);
$result = mysql_query("SELECT * FROM phpbb_users", $link);
$num_rows = mysql_num_rows($result);
$num_rows -= 1;
//2nd
$result2 = mysql_query("SELECT * FROM phpbb_topics", $link);
$num_rows2 = mysql_num_rows($result2);
//3d
$result3 = mysql_query("SELECT * FROM phpbb_posts", $link);
$num_rows3 = mysql_num_rows($result3);
//create image
$string = "SRU Designs forum status:\n\nphpBB Users: $num_rows\nTopics: $num_rows2\nPosts: $num_rows3" ;
$image = imagecreatefrompng("sig.png");
$white = imagecolorallocate ($image, 255,255,255);
$font = "04B_08__.TTF";
imageTTFtext( $image, 6, 0, 20, 100, $white, $font, $string);
header("Content-type: image/png");
imagepng($image);
?>