<td width="20%">First visit at: </td> <td width="35%"><?php echo $stats->first_last_visit("first"); ?> </td> <td width="20%">Visits today: </td> <td><?php echo $stats->show_visits_today(); ?> </td> </tr> <tr> <td>Last visit at: </td> <td><?php echo $stats->first_last_visit("last"); ?> </td> <td>Total visits: </td> <td><?php echo $stats->show_all_visits(); ?> </td> </tr> </table> <?php echo $stats->stats_country(); echo $stats->stats_totals(); echo $stats->stats_monthly(11, 2004); ?> </body> </html>
function call_visitors_text() { global $tool; include_once 'inc/functions/resort_tools.php'; if (!user_has_access($tool)) { echo "Sorry, this page is restricted to ORKFiA Staff"; include_game_down(); exit; } $stats = new Count_visitors(); ?> <h2>Visitor statistics (<?php echo $_SERVER['HTTP_HOST']; ?> )</h2> <table class="medium" cellspacing="0" cellpadding="0"> <tr class="header"> <th colspan="4">Overall</th> </tr> <tr class="subheader"> <th>Type</th> <th>Date</th> <th>Type</th > <td>#</td> </tr> <tr class="data"> <th width="20%">First visit at </th> <td class="left" width="35%"><?php echo $stats->first_last_visit("first"); ?> </td> <td width="20%">Visits today: </td> <td><?php echo $stats->show_visits_today(); ?> </td> </tr> <tr class="data"> <th>Last visit at </th> <td class="left"><?php echo $stats->first_last_visit("last"); ?> </td> <td>Total visits: </td> <td><?php echo $stats->show_all_visits(); ?> </td> </tr> <tr class="data"> <th nowrap>Daily average (month) </th> <td class="left"><?php echo $stats->average_visits_day(date("m"), date("Y")); ?> </td> <td nowrap>Most visits a day: </td> <td><?php echo $stats->show_max_visited_day(); ?> </td> </tr> </table> <?php echo $stats->stats_country(); echo $stats->stats_totals(); echo $stats->stats_top_referer(20); echo $stats->stats_monthly(date("m"), date("Y")); ?> <?php }
<?php //echo $_SERVER['DOCUMENT_ROOT']; include "count_visitors_class.php"; //classes is the map where the class file is stored // create a new instance of the count_visitors class. $my_visitors = new Count_visitors(); //$my_visitors->delay = 1; // how often (in hours) a visitor is registered in the database (default = 1 hour) //$my_visitors->insert_new_visit(); // That's all, the validation is with this method, too. #echo $my_visitors->show_all_visits(); #echo $my_visitors->stats_monthly(02, 2011); // will show the visits in November 2004 in a daily format echo $my_visitors->stats_totals(); echo $my_visitors->stats_country(); ?>