<?php
header("Content-type: image/png");
$string = $_GET['text'];
$icfp = imagecreatefrompng("image.png");
$color = imagecolorallocate($icfp, 225, 225, 0);
$imgsx = (imagesx($icfp) - 7.5 * strlen($string)) / 2;
imagestring($icfp, 3, $imgsx, 9, $string, $color);
imagepng($icfp);
imagedestroy($icfp);
?>
<img src="image.php" />
<?php
Header('Content-Type: Image/png');
$image = file_get_contents('image.PNG');
Echo $image;
<?php
If(isset($_GET['SRC'])):
If(file_exists("images/{$_GET[SRC]}.png")):
$img = file_get_contents("images/{$_GET[SRC]}.PNG");
Else:
// get pack up or not found image
Endif;
Endif;
?>
Sounds like you're trying to hack something (maybe using a shell?). What scenario are you trying to do this for?I don't think you guys understand.
I want to be able to include a PHP script as an image. I.e. <img src="path_to_script.php" /> and have it run a script in the background each time the page is loaded.
It needs to be an image. No iframes. I know it's possible because I've seen it done.
Sounds like you're trying to hack something (maybe using a shell?). What scenario are you trying to do this for?
the page has to be a php page, so if it's an html (.html) page and you're including it a php file it wont work
as far as my knowledge goes you can't run a php file in an html page unless you use htaccess to make .html pretend to be .phpI'm not.
I need a script to run in an HTML page (cannot include PHP).
I need to include an image so I can run CRON jobs everytime the page is loaded.
<?php
//this is a php file
include('variables.php');
?>
<html>
<head>
<title><?php echo $title; ?></title><!-- just included a variable on a html page woa -->
</head>
</html>
Taken from another open source system.
Which is including this file...
But my attempts to do something like this (even by copying this file and removing non-existant object calls) seems to fail.
Do you not understand what a cronjob is? The OS runs them on a schedule..