You are here: PHP to print an image for WAP « All PHP « IT news, forums, messages
PHP to print an image for WAP

Posted by Buzz on 10/13/27 11:28

Please can anyone advise on how to use PHP to print an image for WAP.
No other forums have been able to help. Not sure if it's an XML thing
or a WAP server push thing or something else.

I can get print to work with .jpgs on a www. page or through a mobile
phone browser (transitional doctype) :

<h4>Picture of the day:</h4>
<?php
$image_path = "../images/mobile";
$images =
array('image_sun.jpg','image_mon.jpg','image_tue.jpg','image_wed.jpg','image_thu.jpg','image_fri.jpg','image_sat.jpg');
$day_of_week = date("w");
print("<img src=\"$image_path/$images[$day_of_week]\" alt=\"pic of the
day\" />");
?>

The following does not work (all other aspects apart from the images
work):

<?php
// send wml headers
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<card title="....." id="tuesday">
<?php
// printing picture of the week with an array
$image_path = "../images/mobile";
$images =
array('sunday.wbmp','monday.wbmp','tuesday.wbmp','wednesday.wbmp','thursday.wbmp','friday.wbmp','saturday.wbmp');
$day_of_week = date("w");
print("<img src=\"$image_path/$images[$day_of_week]\" alt=\"day of the
week\" />");
?>
</p>
.......
<a href="wap.php">Back: Home</a></p>
</card>
</wml>

thanks!
http://www.ekstasis.net/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация