i have following php code which display company logo
<?php
$key=$_GET['key'];
/// key process ///
////////////////////
?>
<img src=images/logo.jpg" />
when i run this php file this show logo.jpg
but when i call this from
<img src="../temp.php?key=123" width="438" height="100" />
it didn’t show image
actually what i want to track this image.
Thanks
If you want to use something like this :
Then
temp.phpshould actually :This is because the browser expects that the URL pointed to by the
srcattribute of the<img>tag actually corresponds to a valid image — and not some HTML text.For instance,
temp.phpcould contain something like this :As a couple of sidenotes :
Content-typeHTTP header ; which means you must know if your image is a gif, jpeg, png, …$_GET['key']is correct, to not send the content of an un-wanted file !<?php ... ?>tags : the only output must be the content of the image.