zoukankan      html  css  js  c++  java
  • PHP系统流量分析的程序

    简介:这是PHP-系统流量分析的程序的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。

    class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=325331' scrolling='no'> >create table stream (
    ip text,
    sTime int,
    visits int,
    info text);
    <?
    if($day<0)$day=0;
    $mlink=mysql_connect('localhost','ajax','xxxxxxx');
    //统计至今首页被浏览的总次数
    $query="select SUM(visits) as tvisits from stream";
    $result=mysql_db_query('ajax',$query,$mlink);

    echo '<span class="st1">浏览首页总累积次数:';
    if($row=mysql_fetch_object($result)){
    echo $row->tvisits;
    }

    $week=array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
    for($i=0;$i<=$day;$i++){
    echo '<p>';
    $ctime1=time()-24*3600*$i;
    $ctime2=time()-24*3600*($i-1);
    echo '<span class="st4">日期:'.date("m月d日",$ctime1).$week[date("w",$ctime1)];
    echo "</span>";

    $stoday1=mktime(0,0,0,date(m,$ctime1),date(d,$ctime1),date(Y,$ctime1));
    $stoday2=mktime(0,0,0,date(m,$ctime2),date(d,$ctime2),date(Y,$ctime2));
    //统计当日首页被浏览的累积次数
    $query='select SUM(visits) as tvisits from stream where sTime>=';
    $query.=$stoday1.' and sTime<'.$stoday2;
    $result=mysql_db_query('ajax',$query,$mlink);
    echo '<span class="st3">浏览首页累积次数:';
    if($row=mysql_fetch_object($result)){
    echo $row->tvisits;
    }
    //统计当日拜访ip的数量
    $query='select * from stream where sTime>='.$stoday1;
    $query.=' and sTime<'.$stoday2.' order by sTime DESC';
    $result=mysql_db_query('ajax',$query,$mlink);

    echo "
    浏览总人数:".mysql_num_rows($result);
    echo '</span><hr size="1">';
    echo '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="st3">';
    echo '<tr><td nowrap class="st2">IP位址</td>
    <td nowrap class="st2">最近时间</td>
    <td nowrap class="st2">次数</td>
    <td nowrap class="st2">用户资讯</td>';
    echo "</tr>";

    while($row=mysql_fetch_object($result)){
    echo '<tr>';
    echo '<td nowrap>'.$row->ip.'</td>';
    echo '<td nowrap>'.date("h:i:sa",$row->sTime).'</td>';
    echo '<td nowrap>'.$row->visits.'</td>';
    echo '<td nowrap>'.$row->info.'</td>';
    echo "</tr> ";
    }
    echo "</table>";
    echo '<hr size="1">';
    }
    mysql_close($mlink);
    ?>

    “PHP-系统流量分析的程序”的更多相关文章 》

    爱J2EE关注Java迈克尔杰克逊视频站JSON在线工具

    http://biancheng.dnbcw.info/php/325331.html pageNo:14
  • 相关阅读:
    BZOJ 1449: [JSOI2009]球队收益 最小费用最大流 网络流
    HDU 4348 To the moon 主席树 在线更新
    省选模拟赛20180416
    线性基总结
    Write-up-Bulldog2
    [Write-up]BSides-Vancouver
    Write-up-Bob_v1.0.1
    Genymotion设置代理至BurpSuite和Charles
    PE之RVA转FOA
    django的序列化
  • 原文地址:https://www.cnblogs.com/ooooo/p/2253741.html
Copyright © 2011-2022 走看看