+ Reply to Thread
Results 1 to 5 of 5
Like Tree2Likes
  • 1 Post By vishal
  • 1 Post By Zubair

Thread: Php mysql [track ip address of vistors to ur site]

  1. #1
    vishal's Avatar
    vishal is offline -::-X10 Guru-::- vishal has a brilliant futurevishal has a brilliant future
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    5,250

    Thumbs up Php mysql [track ip address of vistors to ur site]

    First of all create a table in MYSQL.Here the table name is IPADDRESS with 3 fields id(auto_increment) int,
    ip (varchar (50)) and date(varchar or date)

    Include this script in ur main index page.
    <?php
    include("includes/connection.php");//connection file to database
    $ip=$_SERVER['REMOTE_ADDR'];
    echo "<b>IP Address= $ip</b>";
    echo "<br />";
    $date=gmdate("F j, Y, g:i a", strtotime("+5 hours 30 minutes")); // Modify this to ur local time i.e((GMT) +5hours) or what ever ur local time changes with respect to GMT
    echo gmdate("F j, Y, g:i a", strtotime("+5 hours 30 minutes"));
    $query="INSERT INTO ipaddress (ipaddress,date) values('$ip','$date')";
    mysql_query($query,$connection);
    mysql_close($connection)

    ?>
    Last edited by vishal; 01-07-2010 at 11:28 PM.

  2. #2
    vishal3 is offline x10Hosting Member vishal3 is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    10

    Re: Php mysql [track ip address of vistors to ur site]

    Gooogggdddddd

  3. #3
    vishal's Avatar
    vishal is offline -::-X10 Guru-::- vishal has a brilliant futurevishal has a brilliant future
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    5,250

    Re: Php mysql [track ip address of vistors to ur site]

    thks for supporting me
    dinomirt96 likes this.
    Regards ~ Vishal
    Giving Reputation (at bottom of my post ) is the best way to encourage the person who helped you on forums.

  4. #4
    Zubair's Avatar
    Zubair is offline x10 Super Spammer Zubair has a reputation beyond reputeZubair has a reputation beyond reputeZubair has a reputation beyond repute
    Join Date
    Jul 2009
    Location
    Pakistan
    Posts
    8,743

    Re: Php mysql [track ip address of vistors to ur site]

    Very good...

    keep posting such great tutorials...
    karimirt47 likes this.
    Zubair Barkat | Level 2 Tech
    █ 888-X10-9668 - zubair[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004

  5. #5
    vishal's Avatar
    vishal is offline -::-X10 Guru-::- vishal has a brilliant futurevishal has a brilliant future
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    5,250

    Smile Re: Php mysql [track ip address of vistors to ur site]

    Quote Originally Posted by Boss is the Best View Post
    Very good...

    keep posting such great tutorials...
    Thks for the support
    Regards ~ Vishal
    Giving Reputation (at bottom of my post ) is the best way to encourage the person who helped you on forums.

+ Reply to Thread

Similar Threads

  1. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 11:07 AM
  2. Also got the PHP MySQL error
    By adfad666 in forum Free Hosting
    Replies: 1
    Last Post: 08-16-2008, 08:52 PM
  3. MYSQL server for PHP login
    By wtvelocity in forum Free Hosting
    Replies: 3
    Last Post: 06-05-2008, 12:22 PM
  4. PHP MySQL Question..
    By anuj_web in forum Programming Help
    Replies: 7
    Last Post: 04-26-2008, 06:43 AM
  5. Php And Mysql Forum Rephrased!
    By maddude in forum Scripts & 3rd Party Apps
    Replies: 7
    Last Post: 04-05-2005, 01:14 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