Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    15
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Getting IP of referrering page

    Is there any function or script that can give me the IP address of a referring local page?

    Basically something between $_SERVER['HTTP_REFERER'] and $_SERVER['SERVER_ADDR']

    Thanks.

  • #2
    Regular Coder
    Join Date
    Mar 2009
    Location
    United Kingdom
    Posts
    161
    Thanks
    6
    Thanked 28 Times in 28 Posts
    TRy using the gethostbyname() function.

    Example :
    PHP Code:
    echo gethostbyname('google.com'); 
    would give an outcome of 216.239.59.99

    Hope this helps!

  • Users who have thanked Killermud for this post:

    Herz0g (01-16-2010)


  •  

    Posting Permissions

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