Trinidad Yards-Visitor statistics

Source: Internet
Author: User
最近发现个好网站千里码,里面有很多知名公司CODER把实际工作中经常用到的技术点,或者比较有意义的问题以题目的形式重现,有兴趣的可以去看看,下面是链接地址:http://www.qlcoder.com/home

Each site counts visitor data, such as Uvs, based on guest logs. UV is able to answer a key marketing question: "How many people (prospects) See the information you publish (i.e. the website)."
The following according to the topic given a shopping site access log, statistics on the day of the site UV. Each line of the log file represents a single access behavior, with each line containing three items, the time the user visited, the user's ID, and the user's behavior. The August 24 day, how many users of the site visited.

Just learned PHP, it wrote a, it is relatively simple


    
     $a=new countt();$a->cc();classcountt{functioncc()    {$arr=array();        $count=0;        $f=file("uv.txt");        foreach($fas$k=>$v)        {            $a=explode(" ",$v);            $arr[]=$a[1];        }        sort($arr);        //print_r(array_unique($arr));echo count(array_unique($arr));    }}?>

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the Trinidad code-visitor statistics, including the aspects of the content, I hope to be interested in PHP tutorial friends helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.