how to get the header information of a website using php???

Discussion in 'PHP' started by raahatazim, Aug 4, 2007.

  1. #1
    hi......it would be a great help if someone provides the php code to get the header info of some site,like www.google.com........any help would be appreciated.
     
    raahatazim, Aug 4, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

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

    raahatazim Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thnzz very much.
     
    raahatazim, Aug 4, 2007 IP
  4. Chemo

    Chemo Peon

    Messages:
    146
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    HEAD request...much faster than using common functions (file_get_contents, etc) since it does not download the body. If you are doing multiple requests...possibly curl_multi_init()...then it'll give you about a 95% increase in performance.

    Bobby
     
    Chemo, Aug 4, 2007 IP
  5. nabiha

    nabiha Peon

    Messages:
    111
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Why do you need headers of the big sites?
    Just learning new things, that is why asking.
     
    nabiha, Aug 4, 2007 IP
  6. raahatazim

    raahatazim Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    HEADER info contains information abt many info like server info,cookie info etc. u might need those.
     
    raahatazim, Aug 5, 2007 IP