I have a website where I have been using an invisible popup to embed my affiliate links each time the page loads.
However now I need html or javascript code which will rotate 4 different affiliate websites after each page load and set the code so that it only shows for a period of time of once a day or once every 7 days.
For instance, when you enter the website it will embed a cookie from website1, and then when you click on another page or do a page reload it will embed website2 cookie, ect... to website 4. After 5 pageloads it will stop embedding cookies until a period of time 1 or 7 days for that user.
I need the working code within the next 24 hours or less. Please tell me your price.
Below is code which may be on the correct path...
<script>
<!-- Begin
//Pop-under window - [login to view URL]
var popunderSpaFinder="[login to view URL]"
var winfeatures="width=780,height=580,scrollbars=1,res izable=1,toolbar=1,location=1,menubar=1,status=1,d irectories=0"
var once_per_session=1
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if ([login to view URL] > 0) {
offset = [login to view URL](search)
if (offset != -1) { // if cookie exists
offset += [login to view URL]
// set index of beginning of value
end = [login to view URL](";", offset);
// set index of end of cookie value
if (end == -1)
end = [login to view URL];
returnvalue=unescape([login to view URL](off set, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie('popunderSpaFinder')==''){
loadpopunderSpaFinder()
document.cookie="popunderSpaFinder=yes"
}
}
function loadpopunderSpaFinder(){
win2=[login to view URL](popunderSpaFinder,"",winfeatures)
[login to view URL]()
[login to view URL]()
}
if (once_per_session==0)
loadpopunderSpaFinder()
else
loadornot()
// End -->
</script>