How to get server response code

Discussion in 'Site & Server Administration' started by carlg, Dec 31, 2008.

  1. #1
    How do I bring up a web page and see the response code (404, 200, etc.)?
     
    carlg, Dec 31, 2008 IP
  2. vx|brian

    vx|brian Peon

    Messages:
    34
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This depends on what language you're trying to code it in? In Perl you can use LWP::Simple and use the head() function, in PHP i think you'll have to use fopen and sockets as i'm not aware of a function that gives you these details.
     
    vx|brian, Dec 31, 2008 IP
  3. freddieMaize

    freddieMaize Guest

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can also use telnet option from the command prompt.

    telnet hostname port#
     
    freddieMaize, Jan 2, 2009 IP