Is there any way to do this?
My code for the theimage.php ::
Code: Select all
<?php
Header ("Content-type: image/png");
/* Connect to the DB */
$dbhost = "localhost";
$dbname = "dbname";
$dbuser = "dbuser";
$dbpass = "dbpass";
$query1 = mysql_db_query($dbname, "SELECT votes.user_id, COUNT( votes.vote_id ) AS n, vote_users.id, vote_users.name AS name, vote_users.active FROM votes, vote_users WHERE votes.user_id = vote_users.id AND votes.user_id =112113 GROUP BY votes.user_id ORDER BY n");
while($result = mysql_fetch_array($query1)) {
$rating=$result[n];
//echo($rating);
}
$img_handle = imageCreateFromPNG("http://www.myserver.com/images/theimage.png");
$color = ImageColorAllocate ($img_handle, 255, 210, 000);
$ip = $_SERVER['REMOTE_ADDR'];
ImageString ($img_handle, 3, 10, 9, "Your rating is: $rating", $color);
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>
Thanks,
Caleb