Code: Select all
<?PHP
$im = ImageCreateFromPNG("1.png") or die("No go on the PNG");
$size = '12';
$angle = '0';
$font = "Bamboo.ttf";
$textstr = "*";
mysql_connect("www.freesql.org","dnathe4th","THISISNOTMYPASSWORD") or die("Unable to connect");
@mysql_select_db("DNA_Fury_members") or die( "Unable to select database");
$query = "SELECT * FROM click_research";
$result = mysql_query($query) or die("Unable to submit query");
$num = mysql_numrows($result);
mysql_close();
$i = 0;
while($i < $num)
{
$color = ImageColorAllocate($im, rand(0, 100), rand(0, 100), rand(0, 100)) or die("Unable to allocate color");
$x = mysql_result($result, $i, "x");
$y = mysql_result($result, $i, "y");
ImageTTFText($im, $size, $angle, $x, $y, $color, $font, $textstr) or die("Could not do whatever this does");
$i++;
};
header("Content-Type: image/x-png");
echo ImagePNG($im);
?>