Kane Hart
Member
+0|6768
Well I run game servers and such theres mysql and I wanted know if anyone could post a simple quary I would like try make a gd image for my site it be fun hehe..

Anyone have any ideas?
ssj4gogeta
Member
+1|6847|England, Uk
What are you wanting to do with the GD show your stats, your server stats or what.
Kane Hart
Member
+0|6768
Heres what I got so far..

.htaccess

Code:

AddType application/x-httpd-php .png
test.png

Code:

<?php
//visit http://www.iceteks.com/articles.php?act=view&article=textsig&p=2& for the code
header("Content-type: image/png");

//change this to the number of random quotes you want (for example if you had 15 quotes it would be $number = rand(1,15);
$number = rand(1,9);
//change your random quotes here
if($number==1)$string2 = "NEN IS SEXY!";
if($number==2)$string2 = "somebody set up us the bomb";
if($number==3)$string2 = "Resistance is futile";
if($number==4)$string2 = "NEN are cute";
if($number==5)$string2 = "H4X0R in thE yur PC1?!";
if($number==6)$string2 = "Dude w3re's my c4r?";
if($number==7)$string2 = "s0m3on3 st0l3 my mega hurtz!!";
if($number==8)$string2 = "move zig for great justice";
if($number==9)$string2 = "Rodents make the world cool";

//put your image name here (must be a png)
$im = imagecreatefrompng("yourfile.png");
//change your text color here ( must be the hex value) ex. 255,255,255 would be white
$color = imagecolorallocate($im, 255, 255, 255);

//change your X & y coordinates here to place the text on your image where you want it
//(these will center the text on a 400x100 image)
$px=120;
$py=30;
//no need to touch this unless you know what your doing
imagestring($im, 3, $px, $py, $string, $color);
imagestring($im, 2, $px, $py+12, $string2, $color);

imagepng($im);
imagedestroy($im);
?>
Image File:
http://gamingtown.net/test/1/yourfile.png

Now I want to make this no random lol and also make it grab a quary or 2 from a database..

Anyone able to make an example of this?

Heres a sample refresh to see effect hehe
http://www.gamingtown.net/test/1/test.png

This is my database example I want..

Database: maindb
table: characters
Field: "online 1 is online and 0 is not online so go and see how many 1's there are say theres how many people online"

Last edited by Kane Hart (2005-10-18 15:47:06)

Kane Hart
Member
+0|6768
ok this what I have a database called "maindb"  then a table called characters from there I got a field called online 1 means yes 0 means no ones online... SO I would like to have a sig that just shows whos online...

check my 2nd post on the bottom of a nicer what I said there hehe

Last edited by Kane Hart (2005-10-18 15:47:27)

ssj4gogeta
Member
+1|6847|England, Uk
If no one else posts it or if you dont find it out i will post it tommorw, I don't have the code to hand right now.
You could also check out http://www.pixel2life.com/tutorials/PHP … ;ss=random just a quick search i did not sure if any of them are any good.
Kane Hart
Member
+0|6768
ok Thanks for the link somthing to play with tonight
Kane Hart
Member
+0|6768
it's a new day
Kane Hart
Member
+0|6768
3 days now
ssj4gogeta
Member
+1|6847|England, Uk
Sorry man not had chance to code it i thought i had the code, I will try and have a go at it for you tommorw is that link i gave you not any good.

Board footer

Privacy Policy - © 2024 Jeff Minard