Welcome to WebmasterWorld Guest from 54.163.25.166

Forum Moderators: incrediBILL & martinibuster

Message Too Old, No Replies

How to insert Ads script into html without paste directly

     
10:05 am on Aug 7, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:June 6, 2005
posts:71
votes: 0


How to insert Ads script into html without paste directly
Before,I have PHP page and I can use PHP include for Ads
Now,my page is html and I need to insert Ads like PHP include statement.Because,when I need to change Ads format I can change at one file.

Is this possible?
How can I do?

10:17 am on Aug 7, 2005 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 30, 2000
posts:497
votes: 0


Use SSI, <!--#include virtual="/adsense.txt" -->
and put

AddType text/x-server-parsed-html .html
AddType text/x-server-parsed-html .htm

into your .htaccess file to treat html,htm files as shtml (if your can't already include files in html)

10:21 am on Aug 7, 2005 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 24, 2005
posts:528
votes: 0


Hallo Naty,

When your provider supports it you can use SSI (server side includes).

I'm using this line of code:
<!--#include virtual="/AdSenseCodeHere.shtml" -->

It's possible that you need to rename your html pages to .shtml or whatever (depending on ISP).

10:46 am on Aug 7, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member jetteroheller is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 22, 2005
posts:2979
votes: 1


I just implemented it to insert it by SSI

<!--#include virtual="/cgi-bin/ssi.pl?from=google-g&insert=300x250&arb=book-theme" -->

from=google-g

load the text file google-g.txt
where all used ad fromats are stored
(g stands for German, on an english page would be google-e)

insert=300x250
Take the code for the 300x250 from google-g.txt

arb=book-theme

Amazon recommended book
I use Amazon as an PSA replacement
This is the parameter for the Amazon recommended book search

10:57 am on Aug 7, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:June 6, 2005
posts:71
votes: 0


That 's great for me.
I never know about this technic.

While(1)
{
Thanks for all reply;
}

Any comment welcome

NT

11:29 am on Aug 7, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:June 6, 2005
posts:71
votes: 0


Hi again

I can't test it on my PC(Appserv on WinXP)
But on real server it OK.

Because, I can't create file .httaccess on WinXP

How can I do?
Please.

12:02 pm on Aug 7, 2005 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 24, 2005
posts:528
votes: 0


Hello Naty,

Since this is the adsense forum I would suggest you take this question to the Apache forum. Since Apache is part of the Appserve package.

The guys (and girls) over there should be able to get things running locally.