Dynadot โ€” .com Registration $8.99

Is This Possible ?

Spaceship Spaceship
Watch

aLeeOnline

Established Member
Impact
3
hi there, im looking for a javascript for my google adsense basically. i want my ads to show up only once per visit. is it possible? if yes kindly tell me here, im sure it will be helpful for many adsense users here.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
aLeeOnline said:
hi there, im looking for a javascript for my google adsense basically. i want my ads to show up only once per visit. is it possible? if yes kindly tell me here, im sure it will be helpful for many adsense users here.
There is a way to do that using cookies I think... It could be done using php sessions also.

Im not too sure on the javascript way. Could I ask though why you only want the ads to show once per visit?
 
0
•••
i want that script if anyone can arrange.
 
0
•••
It's very easy. I'm not good at JS, so I'll tell you how to do it in PHP.

<?php
if (!isset($_COOKIE['first']){
?>
Your Adsense code goes here
<?
$_COOKIE['first']=true;
}
?>

PS: I haven't tested this yet.
 
0
•••
will i just have to copy and paste it into my page ? im using a webpage with .html or .htm extension, not using php. will it work just by copy pasting this code ? thanks in advance n sorry for such noob questions :(
 
0
•••
May I ask what you would like to show the rest of the time? I am working on a Javascript applet for you.. I just need to know..

- Steve
 
0
•••
aLeeOnline said:
will i just have to copy and paste it into my page ? im using a webpage with .html or .htm extension, not using php. will it work just by copy pasting this code ? thanks in advance n sorry for such noob questions :(

if you want to run php in your html files just add in your apache configuration:
AddType application/x-httpd-php .php .phtml .php3 .html


Regards
Adrian
 
0
•••
thnx

iNod said:
May I ask what you would like to show the rest of the time? I am working on a Javascript applet for you.. I just need to know..

- Steve

omg, thanks Steve, well it can show any other html page for the rest of the times like www.mydomain.com/demo.html. my google ads must be shown once per day. thanks a million again buddy :)
 
0
•••
iNod ? mate u there ... ?
 
0
•••
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back