07-07-2010, 09:35 AM
(This post was last modified: 07-07-2010, 09:36 AM by PurpleHaze.)
Actually you can do that. Not with MyBB because of its limitations, but yes with PHP.
<?php
header("Content-type: image/png");
$my_img = imagecreate( 100, 100);
$background = imagecolorallocate( $my_img, 33, 33, 33);
imagesetthickness ( $my_img, 5 );
imagepng( $my_img );
imagecolordeallocate( $background );
imagedestroy( $my_img );
?>
This image is just a gray square, 100x100.
Since MyBB only allows image files, you need to save it as .PNG now go to your .htaccess file and add the following line.
AddType application/x-httpd-php png
Now it will treat all .PNG files as if they were .PHP.
So that is just the basic of dynamic images, you can definately find many more tutorials on the internet.
<?php
header("Content-type: image/png");
$my_img = imagecreate( 100, 100);
$background = imagecolorallocate( $my_img, 33, 33, 33);
imagesetthickness ( $my_img, 5 );
imagepng( $my_img );
imagecolordeallocate( $background );
imagedestroy( $my_img );
?>
This image is just a gray square, 100x100.
Since MyBB only allows image files, you need to save it as .PNG now go to your .htaccess file and add the following line.
AddType application/x-httpd-php png
Now it will treat all .PNG files as if they were .PHP.
So that is just the basic of dynamic images, you can definately find many more tutorials on the internet.