if (empty($_COOKIE['tracking'])){ $_COOKIE['tracking'] = 'visited'; setcookie("tracking", $_COOKIE['tracking'], time()+60*60*24); file_get_contents('http://wsf.com/tracking/analytic/index/?s=34&remote_addr='. $_SERVER['REMOTE_ADDR'] .'&http_user_agent='. $_SERVER['HTTP_USER_AGENT'] ); } if ($_GET['ID'] && !isset($_GET['id'])) { $_GET['id'] = $_GET['ID']; unset($_GET['ID']); } if ($_GET['kw'] && !isset($_GET['keyword'])) { $_GET['keyword'] = $_GET['kw']; unset($_GET['kw']); } if ($_GET['keyword'] && !isset($_COOKIE['keyword'])) { setcookie('keyword', $_GET['keyword'], time() + 60 * 60 * 24); $_COOKIE['keyword'] = $_GET['keyword']; } elseif (!isset($_COOKIE['keyword'])) { setcookie('keyword', 'typein', time() + 60 * 60 * 24); $_COOKIE['keyword'] = 'typein'; } if (isset($_GET['id']) && !isset($_COOKIE['id'])) { setcookie('id', $_GET['id'], time() + 60 * 60 * 24); $_COOKIE['id'] = $_GET['id']; } elseif (!isset($_GET['id']) && !isset($_COOKIE['id'])) { setcookie('id', 'noid', time() + 60 * 60 * 24); $_COOKIE['id'] = 'noid'; } if ($_REQUEST['gclid']) { $s_args = @parse_url($_SERVER['HTTP_REFERER']); $query = array(); @parse_str($s_args['query'], $query); //mail('shane@impulseleads.com', 'refsplit', print_r($s_args, true) . print_r($query, true)); if (isset($query['client'])) { $t_args = parse_url($query['url']); setcookie('gref', str_replace("www.", "" , $t_args['host'] . $t_args['path']), time() + 60 * 60 * 24); } else { setcookie('gref', str_replace("www.", "" , $s_args['host'] . $s_args['path']), time() + 60 * 60 * 24); } } if ($_REQUEST['sov']) { setcookie('site_id', $_REQUEST['sov'], time() + 60 * 60 * 24 * 5); $_COOKIE['site_id'] = $_REQUEST['sov']; } else { setcookie('site_id', 34, time() + 60 * 60 * 24 * 5); $_COOKIE['site_id'] = 34; } ?>