TDamiao

Visita por Cookie

Feb 20th, 2018
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.  
  3. if(getCookie("cookieRegistro") != 1)
  4. {
  5.  
  6. window.document.write('<iframe style="display:none" src="http://aumenta.se/anunciante/visit-160.html"></iframe><iframe style="display:none" src="http://aumenta.se/anunciante/ref-160.html"></iframe>');
  7.  
  8. }
  9.  
  10.  
  11. setCookie("cookieRegistro", 1, 1);
  12.  
  13. function getCookie(c_name)
  14. {
  15. var i,x,y,ARRcookies=document.cookie.split(";");
  16. for (i=0;i<ARRcookies.length;i++)
  17.   {
  18.   x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  19.   y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  20.   x=x.replace(/^\s+|\s+$/g,"");
  21.   if (x==c_name)
  22.     {
  23.     return unescape(y);
  24.     }
  25.   }
  26. }
  27.  
  28. function setCookie(c_name,value,exdays)
  29. {
  30. var exdate=new Date();
  31. exdate.setDate(exdate.getDate() + exdays);
  32. var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
  33. document.cookie=c_name + "=" + c_value;
  34. }
  35. </script>
Add Comment
Please, Sign In to add comment