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

Report
Posts
1
Registration date
Monday August 7, 2017
Status
Member
Last seen
August 7, 2017
-
 Blocked Profile -
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

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

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.

What error are you getting?

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!