static function GetErrorImage($message, $width = 250, $height = 150, $backgroundColor = null, $fontColor = null, $fontId = 1)
	{
		
		if ($backgroundColor == null) $backgroundColor = array(255,255,255);
		if ($backgroundColor == null) $backgroundColor = array(0,0,0);

		$msg = str_replace("\n","",$message);
		$im = imagecreate($width, $height);
		$bgColor = imagecolorallocate($im, $backgroundColor[0],$backgroundColor[1],$backgroundColor[2]);
		$fontColor = imagecolorallocate($im, $fontColor[0],$fontColor[1],$fontColor[2]);
		$lines = explode( "\r", wordwrap($msg,($width/5),"\r"));
		$count = 0;
		foreach ($lines as $line)
		{
			imagestring($im, $fontId, 2, 2 + ($count * 12) , $line, $fontColor);
			$count++;
		}
		return $im;
	}
static function GetErrorImage($message, $width = 250, $height = 150, $backgroundColor = null, $fontColor = null, $fontId = 1)
	{
		
		if ($backgroundColor == null) $backgroundColor = array(255,255,255);
		if ($backgroundColor == null) $backgroundColor = array(0,0,0);

		$msg = str_replace("\n","",$message);
		$im = imagecreate($width, $height);
		$bgColor = imagecolorallocate($im, $backgroundColor[0],$backgroundColor[1],$backgroundColor[2]);
		$fontColor = imagecolorallocate($im, $fontColor[0],$fontColor[1],$fontColor[2]);
		$lines = explode( "\r", wordwrap($msg,($width/5),"\r"));
		$count = 0;
		foreach ($lines as $line)
		{
			imagestring($im, $fontId, 2, 2 + ($count * 12) , $line, $fontColor);
			$count++;
		}
		return $im;
	}
static function GetErrorImage ( $ message , $ width = 250 , $ height = 150 , $ backgroundColor = null , $ fontColor = null , $ fontId = 1 ) { if ( $ backgroundColor == null ) $ backgroundColor = array ( 255 , 255 , 255 ) ; if ( $ backgroundColor == null ) $ backgroundColor = array ( 0 , 0 , 0 ) ; $ msg = str_replace ( "\n" , "" , $ message ) ; $ im = imagecreate ( $ width , $ height ) ; $ bgColor = imagecolorallocate ( $ im , $ backgroundColor [ 0 ] , $ backgroundColor [ 1 ] , $ backgroundColor [ 2 ] ) ; $ fontColor = imagecolorallocate ( $ im , $ fontColor [ 0 ] , $ fontColor [ 1 ] , $ fontColor [ 2 ] ) ; $ lines = explode ( "\r" , wordwrap ( $ msg , ( $ width / 5 ) , "\r" ) ) ; $ count = 0 ; foreach ( $ lines as $ line ) { imagestring ( $ im , $ fontId , 2 , 2 + ( $ count * 12 ) , $ line , $ fontColor ) ; $ count ++ ; } return $ im ; }
Given text, returns an image reference with the text included in the image
@param string $message
@param int $width
@param int $height
@param array $backgroundColor RGB values from 0-255.  example: array(0,0,0);
@param array $fontColor RGB values from 0-255.  example: array(0,0,0);
@param int $fontId (number between 1 and 5);
@return int image reference
Given text returns an image reference with the text included in the image