kk i am having trouble including a file to get variables from it here is my code
Test.php
<?php
$source = file_get_contents('http://ops.warrock.net/ShowClan.aspx?c=578');
$pattern = '/Record: ([0-9-]+).*?World Rank: ([0-9]+).*?Regional Rank: ([0-9]+)/s';
preg_match($pattern, $source, $matches);
list(, $record, $world_rank, $regional_rank) = $matches;
$clan_name = "The Stealth Elite";
echo "Clan : $clan_name<br>
Record : $record<br>
World Rank : $world_rank<br>
Region Rank : $regional_rank";
?>
image.php
<?
// load the image from the file specified:
$im = imagecreatefrompng("sig1.png");
// if there's an error, stop processing the page:
if(!$im)
{
die("");
}
// define some colours to use with the image
$yellow = imagecolorallocate($im, 255, 255, 0);
$black = imagecolorallocate($im, 0, 0, 0);
// get the width and the height of the image
$width = imagesx($im);
$height = imagesy($im);
// draw a black rectangle across the bottom, say, 20 pixels of the image:
// now we want to write in the centre of the rectangle:
$font = 2; // store the int ID of the system font we're using in $font
$text = $record; // store the text we're going to write in $text
// calculate the left position of the text:
$leftTextPos = ( $width - imagefontwidth($font)*strlen($text) )/2;
// finally, write the string:
imagestring($im, $font, $leftTextPos, $height-18, $text, $yellow);
// output the image
// tell the browser what we're sending it
Header('Content-type: image/png');
// output the image as a png
imagepng($im);
// tidy up
imagedestroy($im);
?>
im trying to include test.php into image.php so i can use the variables in test but i keep getting errors.