/* Name: TotalTracker Description: capture code using js. */ var hwx = ''; var sid = ''; var affid = ''; var pid = ''; var lng = ''; var page_type = ''; var user_ip = '54.196.201.241'; var user_id = '280a85fd84eea8329a5d36d57dc71e40'; var user_agent = navigator.userAgent; var http_referer = document.referrer; var host_name = getHost(); var full_host_name = getHost( true ); //var request_domain = 'www.pcthreat.com'; var request_domain = 'pcthreat.com'; var request_uri = getUri( full_host_name ); var requestUrl = 'http://www.pcthreat.com/external_capture_track.php'; var cookie_data = getCookie('AD'); if(cookie_data == ''){ setCookie('AD',user_id,365); }else{ user_id = cookie_data; } var post_data = 'user_id='+escape(user_id)+ '&HTTP_USER_AGENT='+escape(user_agent)+ '&HTTP_REFERER='+escape(http_referer)+ '&HTTP_HOST='+escape(request_domain)+ '&REQUEST_URI='+escape(request_uri)+ '&REMOTE_ADDR='+escape(user_ip)+ '&hwx='+escape(hwx)+ '&sid='+escape(sid)+ '&affid='+escape(affid)+ '&pid='+escape(pid)+ '&page_type='+escape(page_type)+ '&lng='+escape(lng); postData(requestUrl, post_data); function getHost( full_host ){ var strhost = document.location.hostname; if( full_host ){ return strhost; } else { return strhost.replace('www.', ''); } } function getUri( full_host_name ){ var struri = document.location.href; return struri.replace('http://'+full_host_name, ''); } function setCookie(c_name,value,expiredays){ var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toUTCString()); } function getCookie(c_name){ return ""; } function postData(requestUrl, requestPost) { //alert('requestUrl = '+requestUrl); //alert('requestPost = '+requestPost); var objHTTP, strResult; if (window.XMLHttpRequest) { objHTTP = new XMLHttpRequest(); }else if (window.ActiveXObject) { var version = parseFloat(navigator.appVersion.split("MSIE")[1]); if(version > 6){ objHTTP = new ActiveXObject("Microsoft.XMLHTTP"); }else{ objHTTP = new ActiveXObject('MSXML2.XMLHTTP.3.0'); } } objHTTP.open('POST',requestUrl,false); objHTTP.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); objHTTP.send(requestPost); //var strResult=objHTTP.responseText; // alert('strResult = '+strResult); } function qs() { var qsParm = new Array(); var query = window.location.search.substring(1); //alert('query = '+ query); var parms = query.split('&'); for (var i=0; i 0) { var key = parms[i].substring(0,pos); var val = parms[i].substring(pos+1); qsParm[key] = val; } } return qsParm; }