⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adlog.asp

📁 Sun的高速缓存CachedRowSet方案资料档
💻 ASP
字号:
function XHConn()
{
  var xmlhttp = false, bComplete = false;
  try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
  catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
  catch (e) { try { xmlhttp = new XMLHttpRequest(); }
  catch (e) { xmlhttp = false; }}}
  if (!xmlhttp) return null;
  this.connect = function(sURL, sMethod, sVars, fnDone)
  {
    if (!xmlhttp) return false;
    bComplete = false;
    sMethod = sMethod.toUpperCase();
    try {
      if (sMethod == "GET")
      {
        xmlhttp.open(sMethod, sURL+"?"+sVars, true);
        sVars = "";
      }
      else
      {
        xmlhttp.open(sMethod, sURL, true);
        xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1");
        xmlhttp.setRequestHeader("Content-Type",
          "application/x-www-form-urlencoded");
      }
      xmlhttp.onreadystatechange = function(){
        if (xmlhttp.readyState == 4 && !bComplete)
        {
          bComplete = true;
          fnDone(xmlhttp);
        }};
      xmlhttp.send(sVars);
    }
    catch(z) { return false; }
    return true;
  };
  return this;
}

var e = document.getElementsByTagName("iframe");
function bindElement() {
  for (var i = 0; i < e.length; i++) { 
    if(e[i].src.indexOf('googlesyndication.com') > -1) { 
      e[i].onfocus = trackLog;
      tag = e[i];
    } 
  } 
}

function trackLog() { 
  if (window.status.indexOf('go to') == 0) { 
    sendLog(document.location, window.status.substring(6));
  } 
  if (window.status.indexOf("键连至") == 0) { 
    sendLog(document.location, window.status.substring(4));
  } 
  document.body.focus();
}
 
function sendLog(url, adurl) {
  var myConn = new XHConn();
  if(myConn) {
    var fnNull = function(sXML){}
    var request = "url="+encodeURIComponent(url)+"&adurl="+encodeURIComponent(adurl)+"&refer="+document.referrer;
    myConn.connect("http://www.5inet.net/adlog.asp", "POST", request, fnNull);
  }
}
function domFunction(f, a)
{
  var n = 0;
  var t = setInterval(function()
  {
    var c = true;
    n++;
    if(typeof document.getElementsByTagName != 'undefined' && (document.getElementsByTagName('body')[0] != null || document.body != null))
    {
      c = false;
      if(typeof a == 'object')
      {
        for(var i in a)
        {
          if
          (
            (a[i] == 'id' && document.getElementById(i) == null)
            ||
            (a[i] == 'tag' && document.getElementsByTagName(i).length < 1)
          ) 
          { 
            c = true; 
            break; 
          }
        }
      }
      if(!c) { f(); clearInterval(t); }
    }
    if(n >= 60)
    {
      clearInterval(t);
    }
    
  }, 250);
};
var foobar = new domFunction(function(){bindElement();}, { 'iframe' : 'tag' });

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -