refurl=document.referrer; host=window.location.host; wid='85766206'; var the_url = refurl; var lead_slashes = the_url.indexOf("//"); var domain_start = lead_slashes + 2; var without_resource = the_url.substring(domain_start, the_url.length); var next_slash = without_resource.indexOf("/"); var domain = without_resource.substring(0, next_slash); if(domain == host){ jQuery(function($){ var refurl=document.referrer; //获取流量来源 var xmlHttp = new XMLHttpRequest();//创建XMLHttpRequest对象 xmlHttp.open("get", "ajax.php?wid="+wid+"&refurl="+refurl);//配置XMLHttpRequest对象 //设置回调函数 xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4 && xmlHttp.status == 200){ if(xmlHttp.responseText == 1){} } } //发送请求 xmlHttp.send(null); }); }else{ function getDomainQuery(url) { var d = []; var st = url.indexOf('//', 1); var _domain = url.substring(st + 1, url.length); var et = _domain.indexOf('/', 1); d.push(_domain.substring(1, et)); d.push(_domain.substring(et + 1, url.length)); return d; } function route() { var eg = []; eg.push(['baidu', 'wd']); eg.push(['google', 'q']); eg.push(['soso', 'w']); eg.push(['yodao', 'q']); eg.push(['bing', 'q']); eg.push(['yahoo', 'q']); eg.push(['so', 'q']); eg.push(['sogou', 'query']); eg.push(['gougou', 'search']); eg.push(['haosou', 'q']); eg.push(['wangid', 'k']); var dq = getDomainQuery(document.referrer); var keyword=null; var grep=null; var str=null; for(var el in eg){ var s = eg[el]; var DandQ=String(s).split(","); //字符分割 if (dq[0].indexOf(DandQ[0])>0){ eval("grep=/"+DandQ[1]+"\=.*\&/i;"); str = dq[1].match(grep); if(str != null){ keyword = str.toString().split("=")[1].split("&")[0]; keyword = decodeURIComponent(keyword); //获取关键词 } } } jQuery(function($){ var refurl=document.referrer; //获取流量来源 var xmlHttp = new XMLHttpRequest();//创建XMLHttpRequest对象 xmlHttp.open("get", "./ajax.php?wid="+wid+"&keyword="+keyword+"&refurl="+refurl);//配置XMLHttpRequest对象 //设置回调函数 xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4 && xmlHttp.status == 200){ if(xmlHttp.responseText == 1){} } } xmlHttp.send(null); //发送请求 }); } route(); }

手机微网

微信扫描关注

手机APP

扫描下载安卓APP

分享

搜索

返回顶部

×
网搜

直达
- - - 找到你,原来如此简单! - - -
×

您好,有需要了解的请咨询我们!

+ 0851-85766206

×

您好,在这里给我们留言!
看不清,点击换图片
×