PDA

View Full Version : adsense


warnet
06-08-2006, 01:43 AM
Hi, i'm trying to add a php include code into the adsense code box under the financials configuration instead of javascript.

here is what i entered: <?php @readfile('http://flasharcade.us/mysimpleads/mysa_output.php?r='.$_SERVER['REMOTE_ADDR'].'&show_ad=6'); ?>

this script allows me to geotarget my ad display and it's real crucial i get this to work as ypn is very picky on the origin of traffic that is shown the ypn ads.

it works using a php file on my server so it's not a server issue and if i add the ypn javascript ito the box there is no problem.. i looked through the files and adsense is called up using a smarty tag and i see the tag listed in the header.tpl but adding my code to either to the adsense box or direclty to the header.tpl it doesn't work..

i also tried using a .htaccess hack of AddType application/x-httpd-php .php .html but it appears my hst won't allow me to parse html into a php file.

is there a way to create a mod that would allow me to run this code or adjust
some coding that would make this work.

here is the url to the test . http://www.warriornetwork.com/adtest.php

here is the url to the directory which doesn't show any ads because the coding isn't working
http://www.warriornetwork.com/links1/


joseph

Ryan
06-08-2006, 02:50 AM
If you are doing this in a .tpl file, you have to use {php} {/php} instead.

warnet
06-08-2006, 03:18 AM
If you are doing this in a .tpl file, you have to use {php} {/php} instead.

Ryan thank you very much..

i got it to work by playing with it a little..
i used this in the header.tpl
{php}readfile('http://flasharcade.us/mysimpleads/mysa_output.php?r='.$_SERVER['REMOTE_ADDR'].'&show_ad=6'); {/php}

now i can run ypn ads and not have to worry about getting my account disabled again for too much non us traffic

if anyone wants the script just pm and i will send you link to the website.
it's not my script and was relativelly inexpensive considering the features it provides.

the url i gave before is my test site and if you are from the us you will
see ypn if not you should searchfeed ads..

Joseph
Joseph Dietrick