#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    35
    Rep Power
    14
    I know the function named gethostbyaddr( $REMOTE_ADDR ), but it is slow
    Is there another way?
    or can I get it from HTTP header?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Melbourne, Victoria, Australia
    Posts
    104
    Rep Power
    14
    In most cases it is already put into $REMOTE_ADDR anyway. If it's already there, there's no harm in using it.
  4. #3
  5. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    The environment var for remote address typically only contains the IP address, and not the name of the host.

    And yes, resolving the host, by it's address can take a few sometimes..

    if you want just the remote users IP address then using REMOTE_ADDR gives you that, but if want the "host name" then you'd need to pass it through the gethostbyaddr() function.

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.

Similar Threads

  1. Changed ISP's now have host name problem
    By Dean7 in forum Linux Help
    Replies: 8
    Last Post: July 6th, 2003, 10:05 AM
  2. Replies: 2
    Last Post: May 15th, 2003, 06:29 PM
  3. anonFTP hack?
    By (jp) in forum FTP Help
    Replies: 3
    Last Post: March 10th, 2003, 01:58 PM

IMN logo majestic logo threadwatch logo seochat tools logo