Click to See Complete Forum and Search --> : Adsense doesn't work with XML?


Cris987
12-26-2004, 06:02 PM
I'm using google adsense on my website, and it won't work with my xml headings:

<?php
if(stristr($_SERVER['HTTP_ACCEPT'],"application/xhtml+xml")) {
header("Content-Type: application/xhtml+xml; charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?'.'>';
} ?>

When I use mozilla firefox - which accepts the above xml heading, the ads won't appear at all.

However, when I use internet explorer - which ignores the above headings, the ads do show.

http://jayscn.aboho.com

Anybody know why this is happening and how to fix this? Thx.

vinoth
12-28-2004, 08:19 AM
prob why donot you use javascript,

why you are getting trouble yourself.

it is neither problem with the browsers, the coding appears to have some errors, fix it up.

AdamGundry
12-28-2004, 08:42 AM
Adsense does not work with strictly interpreted XHTML because it generates code using document.write() calls. This article (http://keystonewebsites.com/articles/adsense.php) describes the problem and possible workarounds.

Adam