SA-MP Forums Archive
Little HTML,Graphix,PHP help ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Little HTML,Graphix,PHP help ? (/showthread.php?tid=295437)



Little HTML,Graphix,PHP help ? - Ronaldo_raul™ - 06.11.2011

I have a PHP query that gives the information about any server but i want with picture. I mean same like the other server monitors do have ! if anyone can help me! please POST!

Link - www.mortalgamming.volthttp.com/sampquery.php

Regards,
Ronaldo_raul™


Re: Little HTML,Graphix,PHP help ? - Pinguinn - 06.11.2011

imagepstext


Re: Little HTML,Graphix,PHP help ? - Ronaldo_raul™ - 06.11.2011

Quote:
Originally Posted by Pinguinn
Посмотреть сообщение
I really cant figure it out any code or something ?


Re: Little HTML,Graphix,PHP help ? - Pinguinn - 06.11.2011

imagettftext
This one will be easier to use I guess


Re: Little HTML,Graphix,PHP help ? - Ronaldo_raul™ - 06.11.2011

Quote:
Originally Posted by Pinguinn
Посмотреть сообщение
imagettftext
This one will be easier to use I guess
Quote:

The font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2).

what is GD1 and GD2...?

Its all out of my mind can ya go through the link and give me a piece of code?


Re: Little HTML,Graphix,PHP help ? - Pinguinn - 06.11.2011

PHP код:
imagettftext([image file], [text size], [text angle], [(or width)], [(or height)], [text color], [font file (.ttf)], [text]); 
So for example, you want to write in the middle of the image with the text "Hello!", then this could be a possibility

PHP код:
$blank imagecreatetruecolor(600600); # (width, height) 
$black imagecolorallocate($blank000); # (image, r, g, b)
imagettftext($blank, , 0600/2600/2$black'arial.ttf''Hello!'); 



Re: Little HTML,Graphix,PHP help ? - XFlawless - 06.11.2011

About GD library.

PHP код:
<?php
header
("Content-type: image/png");
$string $_GET['text'];
$im     imagecreatefrompng("images/button1.png");
$orange imagecolorallocate($im22021060);
$px     = (imagesx($im) - 7.5 strlen($string)) / 2;
imagestring($im3$px9$string$orange);
imagepng($im);
imagedestroy($im);
?>
Example from php web site.