Thread: IP Posting

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    12
    Rep Power
    0
    Hey there,
    Is there a convenient variable for the server's IP? I was thinking of trying to have my wget crontab also post up a page that displays the server's (dynamic) IP, so I could access the box from school. Any thoughts? (PLEASE RESPOND if you know the answer, lol)

    [This message has been edited by PhantomData (edited September 04, 2000).]
  2. #2
  3. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    try using $SERVER_ADDR
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    Try gethostbyname($SERVER_ADDR). This will return the IP of the given variable, which in this case is the server's address.

    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    12
    Rep Power
    0
    Nerf...
    Those return the internal host ip. I wanted the external one that's associated with the dial-up adapter.
  8. #5
  9. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    man ifconfig

    In win32, run 'winipcfg'

Similar Threads

  1. Replies: 2
    Last Post: November 8th, 2003, 10:42 AM
  2. Hello, did I get kicked for posting the craft thing?
    By Polk in forum Dev Shed Lounge
    Replies: 11
    Last Post: August 4th, 2003, 02:14 PM
  3. New Users ??? Read this first before posting.
    By jdk in forum PHP Development
    Replies: 5
    Last Post: November 1st, 2001, 05:07 PM
  4. posting 2 variables from 1 field?
    By m0nster in forum PHP Development
    Replies: 6
    Last Post: August 30th, 2001, 09:24 AM
  5. Good news posting script?
    By enzy in forum PHP Development
    Replies: 3
    Last Post: August 20th, 2001, 09:06 AM

IMN logo majestic logo threadwatch logo seochat tools logo