+ Reply to Thread
Results 1 to 8 of 8

Thread: Ip Logging system needed

  1. #1
    Yet another F-S member
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Ip Logging system needed

    Hello everyone


    I am a reseller host and i am currently looking for a secure MY SQL way of logging visitors ip address because of the amount of times my pages get damaged or deleted through hacking and i would like to find a secure way to log their ips can any one point me in a general direction without saying search google because i have and not many secure ones


    Thanks

    Best Regards

    Harryb12

  2. #2
    Yet another F-S member
    Join Date
    Jul 2009
    Location
    Dubai Emirate, United Arab Emirates
    Posts
    29
    Thanks
    0
    Thanked 1 Time in 1 Post

    You can use a JavaScript command to find a users IP Address and use AJAX to put it into an SQL! I can't remember how it is done exactly plus it's not reliable as one of your hackers can get around it by simply Disabling JavaScript on their browser

    If you still want the JavaScript command let me know and I'll look for it for you!!

  3. #3
    Yet another F-S member
    Join Date
    Jul 2009
    Location
    Dubai Emirate, United Arab Emirates
    Posts
    29
    Thanks
    0
    Thanked 1 Time in 1 Post

    EDIT: There is a way through PHP as well!
    It can be done this way:

    <?php
    $ip=$_SERVER['REMOTE_ADDR']; // REMOTE_ADDR = visitors IP Address!
    mysql_connect(server,username,password);
    mysql_select_db(database);

    $sql="INSERT $ip INTO table_name";
    mysql_query($sql);
    ?>

    Hope that helps!

  4. Thanks Forbzey, from:

    harryb12 (02-15-2010)

  5. #4
    F-S Fan hiteckart's Avatar
    Join Date
    Apr 2008
    Location
    Chicago, USA
    Posts
    233
    Thanks
    9
    Thanked 17 Times in 17 Posts

    Why not just use the Cpanel's Weblizer for the ip's and pages in question?

  6. #5
    Yet another F-S member
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Quote Originally Posted by Forbzey View Post
    You can use a JavaScript command to find a users IP Address and use AJAX to put it into an SQL! I can't remember how it is done exactly plus it's not reliable as one of your hackers can get around it by simply Disabling JavaScript on their browser

    If you still want the JavaScript command let me know and I'll look for it for you!!
    can you have a look for me please dude

  7. #6
    Yet another F-S member
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Quote Originally Posted by hiteckart View Post
    Why not just use the Cpanel's Weblizer for the ip's and pages in question?
    Hey dude my web host is not hosted by free space and my host doesnt have a webalizer

  8. #7
    Yet another F-S member
    Join Date
    Jul 2009
    Location
    Dubai Emirate, United Arab Emirates
    Posts
    29
    Thanks
    0
    Thanked 1 Time in 1 Post

    Quote Originally Posted by harryb12 View Post
    can you have a look for me please dude
    I have tried searching everywhere and I cannot find the JS version!! The PHP one that I listed above is more reliable (as I don't believe there is a "Disable PHP" button on Web Browsers!)

    Also just FYI: I did not put in the whole of the SQL Query (or write it properly for that matter) - I was rushing when I wrote it (sorry)
    Anyway the SQL Query should look like this:

    $sql="INSERT INTO table_name (The SQL IP Address Column) VALUES ($ip)";

  9. #8
    F-S Fan hiteckart's Avatar
    Join Date
    Apr 2008
    Location
    Chicago, USA
    Posts
    233
    Thanks
    9
    Thanked 17 Times in 17 Posts

    Quote Originally Posted by hiteckart View Post
    Why not just use the Cpanel's Weblizer for the ip's and pages in question?
    Seems like you are re inventing the wheel.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts