PHP Classes

docType: Create HTML or XHTML depending on the user browser

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2010-02-18 (5 years ago) RSS 2.0 feedNot enough user ratingsTotal: 444 This week: 1All time: 5,816 This week: 1,110Up
Version License PHP version Categories  
doctype 1.0Freeware5.0HTML, XML, HTTP, PHP 5
Description Author  

This class can be used to create HTML or XHTML depending on the user browser.

It analyzes the current HTTP request Accept header and depending on whether the browser accepts XHTML documents or not, it creates a DOM document structure with the right DOCType element for XHTML or not.

The rest of the document structure can be composed with other regular calls to DOM object functions.

Innovation Award  
PHP Programming Innovation award nominee
January 2010
Number 8

Prize: One book of choice by Manning
XHTML is standard for defining HTML documents compliant with XML standards.

Web sites may serve their pages in XHTML if the underlying browser supports it.

This class can detect automatically whether the current user browser supports XHTML documents. It serves HTML pages with the correct DOCTYPE and tag structure depending on whether XHTML is supported or not.

Manuel Lemos
Picture of Michael A. Peters
Name: Michael A. Peters <contact>
Classes: 6 packages by
Country: United States United States
Age: 43
All time rank: 878112 in United States United States
Week rank: 631 Up66 in United States United States Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file content.xml Data Sample XML Content
Accessible without login Plain text file example.php Example Sample script
Accessible without login Plain text file README.php Aux. README file
Accessible without login Plain text file style.css Data Style Sheet
Plain text file Class Main class file

 Version Control Unique User Downloads Download Rankings  
 0%Total:444All time:5,816
 This week:1This week:1,110Up