PHP Headers and Popular Mime Types
Like my Create a Basic Web Service Using PHP, MySQL, XML, and JSON illustrates, even though a file's extension ends in PHP, you can still tell the browser that you're outputting a different content type. Here are a few of the more popular content types used on the internet.
header('Content-Type: application/rss+xml; charset=ISO-8859-1');
Just because a file ends in .PHP doesn't mean it responds with XHTML -- respond however you'd like!
New York, NY · October 12-14
Get 20% off with
My trip to Mozilla Summit 2013 was incredible. I've spent so much time focusing on my project that I had lost sight of all of the great work Mozillians were putting out. MozSummit provided the perfect reminder of how brilliant my colleagues are and how much...
This article serves as a point-by-point...
placeholder attribute to INPUT elements. The
placeholder attribute shows text in a field until the...
I've always seen Digg as a very progressive website. Digg uses experimental, ajaxified methods for comments and mission-critical functions. One nice touch Digg has added to their website is their hover share widget. Here's how to implement that functionality on your site...