Location: PHPKode > projects > PHPSiteStats > phpsitestats/db.php
<?php include("inc.header.php"); ?>


<img src=gfx/ico_info.gif> In order to enable your website pages for PHPSiteStats you need too add some small pieces of codes to your pages<br>
<img src=gfx/ico_notice.gif> For each table referenced as a log you must also create the respective table, from the setup page, if not allready existant
<br><br>

<table width=95%>
  <th colspan=2>PHP (codes for adding to php pages)</th>
  <tr class=tlight> 
    <td width='150'>code</td>
    <td width='250'>action</td>
  </tr>
  <tr> 
    <td align="left">&lt;?php db_visits_log("table"); ?&gt;</td>
    <td align="left">the file that has this included will log visits details</td>
  </tr>
  <tr> 
    <td align="left">&lt;?php db_visits_show("table"); ?&gt;</td>
    <td align="left">the file that has this included will show a text based count 
      of visits</td>
  </tr>
  <tr> 
    <td align="left">&lt;?php show_avg("table"); ?&gt;</td>
    <td align="left">the file that has this included will show the average users/day 
      and number of days and visits</td>
  </tr>
  <tr> 
    <td align="left">&lt;?php show_avg("table"); ?&gt;</td>
    <td align="left">the file that has this included will show the average users/month 
      and number of months and visits</td>
  </tr>
  <tr> 
    <td align="left">&lt;?php db_count_show("table"); ?&gt;</td>
    <td align="left">the file that has this included will show a graphic based count of visits</td>
  </tr>
  <tr> 
    <td align="left"><b>&lt;?php include_once("phpsitestats/inc.func.php"); ?&gt;</b></td>
    <td align="left"><b>any file that vill contain any of the above codes will 
      have to have this on first line</b></td>
  </tr>
</table>
<br>
<br>
<table width=95%>
  <th colspan=2>HTML (codes for adding to html pages)</th>
  <tr class=tlight>
    <td width='150'>code</td>
    <td width='250'>action</td>
  </tr>
  <tr> 
    <td align="left">&lt;img src=inc.func.php?picture=db&img=gfx/index.gif&name=table&gt;</td>
    <td align="left"><b>acting as a normal picture tag , it will show the picture 
      and log the visits</b></td>
  </tr>
  <tr>
     <td align="left">&lt;img src=inc.func.php?graphic=progress&logfile=tablename&what=db_30days&gt;</td>
     <td align="left"><b>acting as a normal picture tag , it will show the graph of the last 30 days</b></td>
  </tr>
  <tr>
     <td align="left">&lt;img src=inc.func.php?graphic=progress&logfile=tablename&what=db_alldays&gt;</td>
     <td align="left"><b>acting as a normal picture tag , it will show the graph of the all days</b></td>
  </tr>
</table>
<br>
<br>
<img src=gfx/ico_warn.gif> Prepend your domain and the path to the phpsitestats folder to the link to make it absolute so you can put it on any page Eg. &lt;img src=http://example.com/phpsitestats/inc.func.php?graphic=progress&logfile=tablename&what=db_alldays&gt;

</center>
</body>
</html>
Return current item: PHPSiteStats