Zend - The PHP Company




HTTP

Add Code


Creating HDML Page  

Type: code fragment
Added by: shane39
Entered: 13/06/2001
Last modified: 06/12/2000
Rating: - (fewer than 3 votes)
Views: 4996
This code snippet shows how to send a PHP powered HDML page to a wireless device such as a cell phone, PDA, etc.


<?php
header
("Content-type: text/x-hdml");

// AUTHOR: Shane Stiles
// WEB SITE: http://www.gate39.com - webzine on Japan
// DATE: 6/14/2001
// PURPOSE: HDML based page in PHP
// NOTES: The trick to making your PHP powered HDML page 
//        work is to send the http headers with the
//        proper Content-Type encoding - as seen on the
//        second line. This MUST be the first line sent 
//        across or you'll receive an ugly content 
//        type error.
?>
<HDML VERSION=3.0>
<DISPLAY>
Your first HDML page <?php echo " powered by PHP!"?>.
</DISPLAY>
</HDML>


Usage Example




Rate This Script





Search



This Category All Categories