Welcome to WebmasterWorld Guest from 54.144.243.34

Forum Moderators: incrediBILL & martinibuster

How to insert Ads script into html without paste directly

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

5+ Year Member



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)

10+ Year Member



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)

10+ Year Member



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)

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



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)

5+ Year Member



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)

5+ Year Member



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)

10+ Year Member



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.

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month