PHP Headers and Mime Types
In previous post, I have explained about email send using php email header content type and Mime types.
Actually PHP’s header() is used to send a raw HTTP header. header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. By using Header, you can tell the browser that you’re outputting a different content type in spite of current file extension ends in PHP. Here in this post I have collected a list of popular Header’s content types that’s surely works for you.
List of popular Header’s content types
Text (Print Plain text)
- header(‘Content-type: text/plain’);
XML (Print as XML)
- header(‘Content-type: text/xml’);
CSS (Sets content type as CSS)
- header(‘Content-type: text/css’);
Atom (Sets as Atom)
- header(‘Content-type: application/atom+xml’);
Javascript (Content type as JavaScript)
- header(‘Content-type: text/javascript’);
JPEG Image (Content as JPEG Image)
- header(‘Content-type: image/jpeg’);
JSON (Set type as JSON)
- header(‘Content-type: application/json’);
PDF (Sets content type as PDF)
- header(‘Content-type: application/pdf’);
RSS (Content type as RSS)
- header(‘Content-Type: application/rss+xml; charset=ISO-8859-1′);
Follow @phpzag

This website really has all of the info I needed about this subject and didn’t know who to ask.
I was extremely pleased to discover this great site. I want to to thank you for ones time for this particularly fantastic read!! I definitely really liked every bit of it and i also have you book marked to check out new things on your website.