'true', 'origpage' => '/', 'username' => 'minut_ee', 'password' => 'h6e91t3k', 'submit' => 'submit' ); $area='223'; // Logime sisse $response=http_post_fields('https://www.tnsmetrix.net/login.php', $post_arr); // Otsime küpsise $response=str_replace("\n","",$response); $response=str_replace("\r","",$response); preg_match_all('/Set-Cookie: REPORTSESSID=([0-9a-f]*)\;/Uim', $response, $match, PREG_PATTERN_ORDER); $login_cookie=$match[1][0]; // Compose URL // $url_pageview='http://localhost/tns-pv.php?filter=223'; $url_pageview='https://www.tnsmetrix.net/index.php?section=1&report=29×pan=1&search_multi%5B%5D=223&search_method=in&ddreport=29&search_keyword='; $url_pageview.='&filter='.$area; $url_pageview.='&from='.date("Ymd",time()-86400); $url_pageview.='&to='.date("Ymd"); $url_pageview.='&cur='.date("Ym"); $date_pageview=date('d M y \\\(D\\\)'); // Get // $response=join('',file($url_pageview)); $response=http_get($url_pageview, array('cookies'=>array('REPORTSESSID'=>$login_cookie))); // Parse $response=str_replace("\n","",$response); $response=str_replace("\r","",$response); preg_match_all('/'.$date_pageview.'<\/td>\s*([0-9,]*)<\/td>/Uim', $response, $match, PREG_PATTERN_ORDER); $cnt_pageview=str_replace(",","",$match[1][0]); $code_pageview=''; $tmpstr=sprintf("%06d",$cnt_pageview); for($i=0;$i'; } // Compose URL // $url_pageview='http://localhost/tns-pv.php?filter=223'; $url_uniquevisitor='https://www.tnsmetrix.net/index.php?section=1&report=47×pan=1&search_multi%5B%5D=223&search_method=in&ddreport=&search_keyword='; $url_uniquevisitor.='&filter='.$area; $url_uniquevisitor.='&from='.date("Ymd",time()-86400); $url_uniquevisitor.='&to='.date("Ymd"); $url_uniquevisitor.='&cur='.date("Ym"); $date_uniquevisitor=date('d M y \\\(D\\\)'); // Get // $response=join('',file($url_pageview)); $response=http_get($url_uniquevisitor, array('cookies'=>array('REPORTSESSID'=>$login_cookie))); // Parse $response=str_replace("\n","",$response); $response=str_replace("\r","",$response); preg_match_all('/'.$date_uniquevisitor.'<\/td>\s*([0-9,]*)<\/td>/Uim', $response, $match, PREG_PATTERN_ORDER); $cnt_uniquevisitor=str_replace(",","",$match[1][0]); $code_uniquevisitor=''; $tmpstr=sprintf("%06d",$cnt_uniquevisitor); for($i=0;$i'; } ?> TNS Stats

Leheküljevaatamisi:

Unikaalseid külastajaid: