热门推荐
解析搜索引擎Referer
2024-12-24 00:36

if (refer != '') {

domain = refer.match(/http://www.([^/]+)//)[1];

var kwArr = [{ "dm": "so.com", "kw": "q", "name": "360" }, { "dm": "google.com.hk", "kw": "q", "name": "谷歌香港" }, { "dm": "baidu.com", "kw": "wd|word", "name": "百度" }, { "dm": "soso.com", "kw": "w", "name": "搜搜" }, { "dm": "yahoo.com", "kw": "q", "name": "雅虎" }, { "dm": "bing.com", "kw": "q", "name": "bing" }, { "dm": "sogou.com", "kw": "query", "name": "搜狗" }, { "dm": "youdao.com", "kw": "q", "name": "有道"}];

for (var item in kwArr) {

var $dm = kwArr[item].dm;

var $kw = kwArr[item].kw;

解析搜索引擎Referer

var $name = kwArr[item].name; if (domain == $dm) {

eval("var reg = /[?&](" + $kw + ")=(.+?)(&|$)/ig;");

var keywordCollection = reg.exec(refer);

while (keywordCollection != null) {

keyword = RegExp.$2 + ",";

keywordCollection = reg.exec(refer);

} if (keyword != '') {

keyword = keyword.substring(0, keyword.length - 1);

} channel = $name; userkeyword = decodeURI(keyword);

}

}

    以上就是本篇文章【解析搜索引擎Referer】的全部内容了,欢迎阅览 ! 文章地址:https://sicmodule.kub2b.com/quote/11109.html 
     栏目首页      相关文章      动态      同类文章      热门文章      网站地图      返回首页 企库往资讯移动站https://sicmodule.kub2b.com/mobile/,查看更多   
发表评论
0评