Hi guys, I am Jakob more commonly known as azmazm. I like coding with new languages as I do with this one (my favorite) PHP!


Now what we are going to be doing is making a simple image using php that will either display, The ip, OS, Or web browser!

Now lets begin.
PHP Code:
<?php
$img_number 
imagecreate(350,100);
$backcolor imagecolorallocate($img_number,61,61,61);
$textcolor imagecolorallocate($img_number,255,255,255);

imagefill($img_number,0,0,$backcolor);
$number " Your IP is $_SERVER[REMOTE_ADDR]";
Imagestring($img_number,2,5,50,$number,$textcolor);

header("Content-type: image/jpeg");
imagejpeg($img_number);
?>
Now We will look at this line for a start
PHP Code:
$img_number imagecreate(350,100); 
Basically what this is going to do is assign the variable $img_number to the command imagecreate. What does imagecreate do? You got it, creates the image! The numbers are the length and width So edit to your liking but 350 x 100 is good for signatures.

Now this
PHP Code:
$backcolor imagecolorallocate($img_number,61,61,61); 
Ok so what this does is sets the variable for the backround color (note the colors are in rgb) (61,61,61) This is going to display a nice grey, but if you want here is the link to an rgb color code generator.

ColorSchemer - Online Color Scheme Generator

Rgb is in this order, Red ammount Green ammount, Blue ammount.

And this line
[php]$textcolor = imagecolorallocate($img_number,255,255,255);[/php
same just for the text color (White text)

This is the line that will put it all together.
PHP Code:
imagefill($img_number,0,0,$backcolor); 
It adds the backround color we set the img width and height we set everything to make the image.

Next line
PHP Code:
$number " Your IP is $_SERVER[REMOTE_ADDR]"
Heres the fun "Your IP is $_SERVER[REMOTE_ADDR]"

Now edit the text to your liking MAKING SURE TO LEAVE $_SERVER[REMOTE_ADDR] AS IT IS WHAT GRABS THERE IP.


Next line
PHP Code:
Imagestring($img_number,2,5,50,$number,$textcolor); 
This is where the $number variable gets its location and text size
2,5,50 is the thing we will edit 2 is the text size 5 is the position from the left 50 is the position from the top

and the next line
PHP Code:
header("Content-type: image/jpeg"); 
Basically what this line is doing
Logical says hello what image do you want to show
You send a .php file
It is like LOLNO GTFO
but this line Makes it take a chill pill and be like k wer guud go in
Then you just party hard


next
PHP Code:
imagejpeg($img_number
Is making it a jpg image you can also make png images pm if needed.

So now if you have done it correctly this is what it will look like.


PHP SIGNATURE WOOT


for those looking to tell the operating system of a user replace or add a variable to the line were $_SERVER[REMOTE_ADDR] or w.e the variable is PHP_OS

My host actually reads its own operating system (lul) so I cant show you it. :<