how to use PHP to print an image for WAP

B

Buzz

Please can anyone advise on how to use PHP to print an image for WAP.

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,737
Latest member
Georgeengab

Latest Threads

Top