homepage Welcome to WebmasterWorld Guest from 54.237.98.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

    
How to insert Ads script into html without paste directly
Naty

5+ Year Member



 
Msg#: 8420 posted 10:05 am on Aug 7, 2005 (gmt 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?

 

maccas

10+ Year Member



 
Msg#: 8420 posted 10:17 am on Aug 7, 2005 (gmt 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)

Bddmed

5+ Year Member



 
Msg#: 8420 posted 10:21 am on Aug 7, 2005 (gmt 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).

jetteroheller

WebmasterWorld Senior Member jetteroheller us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 8420 posted 10:46 am on Aug 7, 2005 (gmt 0)

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

Naty

5+ Year Member



 
Msg#: 8420 posted 10:57 am on Aug 7, 2005 (gmt 0)

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

While(1)
{
Thanks for all reply;
}

Any comment welcome

NT

Naty

5+ Year Member



 
Msg#: 8420 posted 11:29 am on Aug 7, 2005 (gmt 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.

Bddmed

5+ Year Member



 
Msg#: 8420 posted 12:02 pm on Aug 7, 2005 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved