Login   Register  
PHP Classes
elePHPant
Icontem

docType: Create HTML or XHTML depending on the user browser

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (4 years ago) RSS 2.0 feedNot enough user ratingsTotal: 438 All time: 5,611 This week: 1,673Up
Version License PHP version Categories  
doctype 1.0Freeware5.0HTML, XML, HTTP, PHP 5
Description Author  
PHP Programming Innovation award nominee
January 2010
Number 8


Prize: One book of choice by Manning
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.
Picture of Michael A. Peters
Name: Michael A. Peters <contact>
Classes: 6 packages by
Country: United States United States
Age: 41
All time rank: 871113 in United States United States
Week rank: 763 Up82 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 xml_doctype.inc Class Main class file

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
 Version Control Unique User Downloads Download Rankings  
 0%Total:438All time:5,611
 This week:0This week:1,673Up