For Neopets ONLY discussion.
Topic locked

Concerned... (Problem Resolved & Thread Locked)

Wed Apr 20, 2005 11:26 pm

I was just viewing source of the new maraqua restaurant and found this...

Code:
<!--
function setCookie(NameOfCookie, value, expirehours) {
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expirehours * 3600 * 1000));
document.cookie = NameOfCookie + "=" + escape(value) + ((expirehours == null) ? "" : "; expires=" + ExpireDate.toGMTString()) + "; path=/;" ;
}
 
function getCookie(name) {
   var beg = document.cookie.indexOf(name+"=");
   var len = beg+name.length+1;
   var end = document.cookie.indexOf(";",len);
   if (end == -1){
      end = document.cookie.length;
   }
   return unescape(document.cookie.substring(len,end));
}

function writeBanner(site){
   var bnum=new Number(Math.floor(99999999 * Math.random())+1);
   document.write('<SCR'+'IPT LANGUAGE="JavaScript" ');
   document.write('SRC="http://servedby.advertising.com/site='+site+'/size=728090/bnum='+bnum+'/optn=1">');
   document.write('</SCR'+'IPT>');
}

function call3rdParty(){
   document.write ('<script language="javascript" src="http://media.fastclick.net/w/get.media?sid=18587&m=1&tp=5&d=j&t=n"></script>');
}


var cookie_name = 'AdCom699904';
var g_c = 'AdComGb';
setCookie(g_c,'1',8760);

if (document.cookie.indexOf(g_c)!=-1 ){
   if (document.cookie.indexOf(cookie_name)==-1 ){
      setCookie(cookie_name,'1',24);
      writeBanner('699904');
   }else{
      var v = getCookie(cookie_name);
      if (v < 3){
         writeBanner('699905');
         v++;
         setCookie(cookie_name,v,24);
   }else if(v < 19){
         writeBanner('699906');
         v++;
         setCookie(cookie_name,v,24);
      }else{
         call3rdParty();
      }
   }
}else{
   call3rdParty();
}
// -->


I saw quite a few "ad-sites" in there and quite a lot of mentions of cookies and I instantly thought cookie-grabbers... I don't really know a lot about webcoding so I just wanted to see if anyone can shed any light on the situation...

Wed Apr 20, 2005 11:29 pm

Why would an official Neopets shop need a cookie-grabber? :roll:

Wed Apr 20, 2005 11:31 pm

It's not a cookie grabber. Relax. It's perfectly normal (and safe) coding.

Wed Apr 20, 2005 11:32 pm

I think it has to do with the frequency of the ads.

Wed Apr 20, 2005 11:33 pm

shadyviolet wrote:It's not a cookie grabber. Relax. It's perfectly normal (and safe) coding.


ok thanks

mods you can lock this now :)

Wed Apr 20, 2005 11:34 pm

Glad this is cleared up. ;) I changed the topic title to let people know why it was locked. I don't want anybody assuming bad things about you. :D
Topic locked