How to create a image.php (show ip +background)

Closed
tmmovie
Posts
1
Registration date
Monday August 7, 2017
Status
Member
Last seen
August 7, 2017
- Updated on Aug 7, 2017 at 04:32 AM
 Blocked Profile - Mar 2, 2018 at 07:27 PM
i can't combine these codes i tested but not work

<?php
$img_number = imagecreate(275,225);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,205,205,205);

imagefill($img_number,0,0,$backcolor);
$number = " Your IP is $_SERVER[REMOTE_ADDR]";

Imagestring($img_number,10,5,5,$number,$textcolor);

header("Content-type: image/jpeg");
imagejpeg($img_number);
?>

+ background

<?php
$im = imagecreatefrompng("imagetest.png");

header('Content-Type: image/png');

imagepng($im);
imagedestroy($im);
?>

in a file (image.php) /please help me /thanks

2 replies

JohnyArts
Posts
1
Registration date
Friday March 2, 2018
Status
Member
Last seen
March 2, 2018

Mar 2, 2018 at 06:57 AM
You can't evaluate PHP in a CSS file. The only way to do this with PHP is to set the CSS value as an inline CSS value.
0
Blocked Profile
Mar 2, 2018 at 07:27 PM
What error are you getting?
0