Can't find it on google. What I want is a php file to work in <img src="url.php"> And it show up in its intirety. I'm wanting to use it for google ads basically saying url.php has the google ad code in it, and when the image source html code is applied... It appears. Thank you.
You need to use the header() function in the first line of the PHP file. You can set the "header" of the file appear as any format (ie a CSS file, a PNG file, a JPG, etc etc). Then you can do what you need to in the actual php to make the image show up as you want it to. Further Reading: http://us3.php.net/image
Because you can't source a php file and then just use include('img.jpg');, if you want to source a php file, you need to header it first so that it appears like an image (to the browser).
Yes, if he wants to include an image - but I thought google ad code was javascript - that's the bit I don't understand
Ah yes, you are right. I must have missed that. There's no way to include Javascript in an img that is headered as an image. You will want to use a PHP include rather, and include a page that displays it normally. What you're trying to do is not possible and if it were possible, it would be against the AdSense TOS.
I've never seen <img src="url.php"> but I have seen <img href="url.php"> I'm not sure exactly how it works but it seems like it runs part of the "url.php" file. Hopefully this will help you.
if the php file is blank and just a generated image could you not just add a fake varible to trick the browser eg image.php?load=.jpg
Both images? Erm, I would not know how. Maybe making the php file do the image tag and just include the php?
I have two images coming from 2 <image src="xxx.jpg> tags, but I just want to combine them to <image src="url.php">
That is so nice collection.Well after finding your this comment there is no need for any book reading search of last few years.I like your idea for distributing the books by years.
hi there ... your answer is yes! we can use php files to display image, just put header('content-type: image/png'); in your top php or before output then u have image with php extension regards note: pls change header type image to suit with ur application