Closed Thread
Results 1 to 2 of 2

Thread: php tracker system

  1. #1
    mr_jodete is offline x10Hosting Member mr_jodete is an unknown quantity at this point
    Join Date
    Apr 2008
    Posts
    18

    php tracker system

    On one page i would like to show the ip adresses and the pages which was accessed by this ips.(its like a static tracker system)

    Here is the code
    <?php
    include "connection.inc.php";
    $connection = connect();
    $query="SELECT * FROM tracker GROUP BY IP";
    $result=mysql_query($query,$connection);
    $views=mysql_num_rows($result);
    echo $views."Unique IPs<br><br>";

    echo "IP views:<br>";
    $query="SELECT *,count(*) FROM tracker GROUP BY IP";
    $result=mysql_query($query,$connection);
    for ($i=0;$i< mysql_num_rows($result);$i++)
    {
    $IP=mysql_result($result,$i,"IP");
    $views=mysql_result($result,$i,"count(*)");
    echo"$IP ";
    echo "views: $views<br>";
    }
    echo "<br>Pages views by $IP:<br>";
    $query="SELECT *,count(*) FROM tracker WHERE IP = '$IP' GROUP BY page";
    $result=mysql_query($query,$connection);

    for ($i=0;$i< mysql_num_rows($result);$i++)
    {
    $page=mysql_result($result,$i,"page");
    $views=mysql_result($result,$i,"count(*)");

    echo"page: $page views: $views<br> ";
    }
    echo "<br>Pages views:<br>";
    $query="SELECT *,count(*) FROM tracker GROUP BY page";
    $result=mysql_query($query,$connection);
    for ($i=0;$i< mysql_num_rows($result);$i++)
    {
    $page=mysql_result($result,$i,"page");
    $views=mysql_result($result,$i,"count(*)");
    echo"page: $page ";
    echo "views: $views<br>";
    }
    ?>

    Can anyone help please?

  2. #2
    Starshine's Avatar
    Starshine is offline Legend Killer Starshine is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    U.S.A.
    Posts
    7,211

    Re: php tracker system

    You have multiple threads open asking the same thing. Please keep this to one forum area.
    Continued abuse of our forums will result in an infraction or temp-ban of your account.

Closed Thread

Similar Threads

  1. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  2. Problem with PHP support ticket system (Fantastico)
    By Jarryd in forum Free Hosting
    Replies: 4
    Last Post: 03-10-2008, 01:35 AM
  3. SUHOSIN - Use of eval is forbidden
    By MaestroFX1 in forum Free Hosting
    Replies: 19
    Last Post: 03-07-2008, 02:42 AM
  4. Free Development Web Software
    By Danfelbm in forum Graphics & Webdesign
    Replies: 1
    Last Post: 03-01-2008, 07:01 PM
  5. Important PHP Information
    By Bryon in forum News and Announcements
    Replies: 0
    Last Post: 11-21-2007, 02:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers