header()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • java.inet@gmail.com

    header()

    hi


    what is the main application of header() function in php.........plz
    explain in clear and depth




    .........i am the newbie of ..php ...so with practical examples also

  • Geoff Berrow

    #2
    Re: header()

    Message-ID: <1180701052.901 974.180420@d30g 2000prg.googleg roups.comfrom
    java.inet@gmail .com contained the following:
    >
    >what is the main application of header() function in php.........plz
    >explain in clear and depth
    >........i am the newbie of ..php ...so with practical examples also
    plz RTFM
    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    • Rami Elomaa

      #3
      Re: header()

      java.inet@gmail .com kirjoitti:
      hi
      >
      >
      what is the main application of header() function in php.........plz
      explain in clear and depth
      >
      >
      >
      >
      ........i am the newbie of ..php ...so with practical examples also
      >
      First you should know what http headers are. All you need to know about
      php's header() is that if you want to send specific headers, other than
      what the server sends by default, you use header to set them. Here's a
      good page to start with: http://www.cs.tut.fi/~jkorpela/http.html

      For example, here's what Google sends, when you open the index page:

      HTTP/1.x 200 OK
      Cache-Control: private
      Content-Type: text/html; charset=UTF-8
      Content-Encoding: gzip
      Server: GWS/2.1
      Content-Length: 1731
      Date: Fri, 01 Jun 2007 12:50:35 GMT

      It's just basic info for the browser, what charset the browser should
      use to display the page (utf-8), how it should render it (html), how big
      file it is...

      You can do plenty of useful things with headers, Google is your friend.

      --
      Rami.Elomaa@gma il.com

      "Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
      usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze

      Comment

      • Jerry Stuckle

        #4
        Re: header()

        java.inet@gmail .com wrote:
        hi
        >
        >
        what is the main application of header() function in php.........plz
        explain in clear and depth
        >
        >
        >
        >
        ........i am the newbie of ..php ...so with practical examples also
        >
        You can start here:



        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • phpCodeHead

          #5
          Re: header()

          On Jun 1, 7:30 am, java.i...@gmail .com wrote:
          hi
          >
          what is the main application of header() function in php.........plz
          explain in clear and depth
          >
          ........i am the newbie of ..php ...so with practical examples also

          clear = header() is used to send a raw HTTP header.

          in depth = Make yourself a pot of coffee and free up a weekend for an
          "edge-of-your-seat" reading session here -http://www.faqs.org/rfcs/rfc2616

          I tend to agree with Geoff... RTFM (sorry, but better for you this way
          in the long run; see quote below); but then if you still don't get
          it ... RTFRFC!

          "Feed a man a fish - feed him for a day; Teach a man to fish - feed
          him for a lifetime"
          =============== =============== =====
          perInfo(
          fname -Gene,
          lname -Kelley,
          email -phpcodehead@gma il.com,
          city -Villa Ridge,
          state -Missouri,
          cntry -USA
          );

          Comment

          • supersmash@gmail.com

            #6
            Re: header()

            On Jun 1, 5:30 am, java.i...@gmail .com wrote:
            hi
            >
            what is the main application of header() function in php.........plz
            explain in clear and depth
            >
            ........i am the newbie of ..php ...so with practical examples also
            One of the main things I use for it is "Location:" . Basically, you can
            do:

            header("Locatio n: http://www.blah.com");

            It is basically a redirect. So, for example, if you accept form data
            and want to redirect to a new page depending on what you receive, you
            can use the header() function.

            - Paul

            Comment

            Working...