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 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    74
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Regarding header()

    i saw many things can be done by header() functions and i know you are also aware of this.

    please tell me specifically why header is required i mean what is header for
    .please explain meee???

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Header sends an http header. Simple as that.
    More information can be found on RFC specification 2616 for http/1.1.

    I'll mention that the use of header is not PHP dependent, it is HTTP dependent. PHP's header method simply includes the desired code into the header section of the http request, prior to the message body.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Fou-Lu View Post
    Header sends an http header. Simple as that.
    More information can be found on RFC specification 2616 for http/1.1.

    I'll mention that the use of header is not PHP dependent, it is HTTP dependent. PHP's header method simply includes the desired code into the header section of the http request, prior to the message body.
    Quote Originally Posted by deshi2003 View Post
    i saw many things can be done by header() functions and i know you are also aware of this.

    please tell me specifically why header is required i mean what is header for
    .please explain meee???
    see Fou-Lu explanation and this is the guilty part:

    http://www.w3.org/Protocols/rfc2616/rfc2616.html

    and his victim:

    http://www.w3.org/Protocols/rfc2616/...c14.html#sec14

    best regards


  •  

    Posting Permissions

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