Welcome to WebmasterWorld Guest from 18.104.22.168
In url.php I put the google ad script.
But it will not work is there something i'm missing?
I wanted to try on my forums and see if I could paste the html snippet (<img src="url.php">) and see if my adsense ad appeared.
How to convert image blob files back to image [webmasterworld.com]
And hey, welcome to WebmasterWorld, newbie2006 ;)
AddHandler application/x-httpd-php .html
AddType application/x-httpd-php .html
set it up in httpd.conf
find that line:
AddType application/x-httpd-php .php
add .html to the end
AddType application/x-httpd-php .php .html
if you do not have root access ask your ISP to perform it on your behalf.
The method that ball4121 used is full logical and full correct. In real the question is in what exactly the php file has to print and where from to take the data for it.
If ball4121 just could not print file from binar, then your method will not solve the problem, but only bring more troubles.
ball4121, if you are going to have a php script in an image tag, then that php script has to return an image. If you are trying to get anything else besides an image in there then it isn't going to work.
if you are trying to include some kind of generated output that isn't an image and you don't want to put the code right into your page then the option of using an include is the right one and you will have to make the page parsable for php.
henry0 mentioned above how to do that on apache, if you are using IIS then you will have to do some searches to figure out how that is done.
I don't see why you can't just put the ad code right into your html page. I am guessing that you can then include it across all pages but not really sure if that is why.