Displaying Users Online on your site.

Discussion in 'PHP' started by aditya_sfs, Dec 25, 2006.

  1. aditya_sfs

    aditya_sfs Peon

    Messages:
    2,271
    Likes Received:
    389
    Best Answers:
    0
    Trophy Points:
    0
    #21
    You mean u want to ignore certain IP addresses ? ? ?
     
    aditya_sfs, Dec 27, 2006 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #22
    It would be simpler to use thier hostname, or thier useragent, each crawler on the web uses a unique user agent, you could make an array of those an if(array_key_exists()) exit; ips can change, so use a hostname or useragent.
     
    krakjoe, Dec 27, 2006 IP
  3. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
  4. legend2

    legend2 Well-Known Member

    Messages:
    1,537
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    115
    #24
    spiders do not execute javascripts, so the code you provided may need to be tweaked:)
     
    legend2, Dec 27, 2006 IP
  5. proprod

    proprod Active Member

    Messages:
    216
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    90
    #25
    Sorry, was talking about the thread-starter. I want to ignore, possibly by user-agent(GoogleBot) or something like that.

    I did use your script and it does work great, but I wanted to link to some additional information about IP and what not and keep it on my site to keep visitors there ;)
     
    proprod, Dec 27, 2006 IP
  6. legend2

    legend2 Well-Known Member

    Messages:
    1,537
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    115
    #26
    I actually have an ip tool there too. If you're talking about an ip2location, thats possible to do too. u'll need a db to match ip ranges.
     
    legend2, Dec 27, 2006 IP
  7. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #27
    Good script overall.

    But not a smart step to die on the user. I recommend removing all the die's from the coding, an error message "Please check back later" is more professional.

    Peace,
     
    Barti1987, Dec 27, 2006 IP