Jump to content

About Headers.....


siddscool19

Recommended Posts

I want to know from where I can learn about headers for example

<?php
$file = 'monkey.gif';

if (file_exists($file)) {
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename='.basename($file));
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    header('Content-Length: ' . filesize($file));
    ob_clean();
    flush();
    readfile($file);
    exit;
}
?>

I have taken these codes from php.net

I would like to know from where to learn about headers because I see that they play a really good role in php and can help a lot. So I wanted to know that from where to learn about them in detail and their uses....

 

Thanks

 

Link to comment
Share on other sites

Can u give me a site.... I did try but no good :(

 

I tried googling hypertext transfer protocol specifications as Daniel0 suggested and I got absolutely nothing.  NOTHING!  wtf is up with that?  You would think something would come up. 

 

I mean first off a frickin' wikipedia entry is first on the list.  That just proves what a bunk service google is, because we all know the lack of value in wikipedia.  And the 2nd entry is from some place called w3.org.  And I do see that thorpe's link did come up as 3rd listing, which is also a page from this w3.org place.  But wtf is that w3.org?  Is that some kind of script kiddie lingo for "we"? 'we' what? Stupid kids these days, with their wes and 'wiis' and 'wee'. 

 

Is it really too much to have a learnaboutheaders.com show up when I go to google?  If google wants to make it as a company they need to get on the ball with this searching thing.  Otherwise they are just gonna be another no name company run into the ground. 

 

Link to comment
Share on other sites

Yeah, but CV's post was literally dripping with sarcasm.

 

Edit: Gah, they've got me too. I now seem to be using 'literally' to mean anything but literally.

 

Indeed, reading it again I see. Sometimes, I guess I'm just a little too dry for sarcasm.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.