473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to use PHP to print an image for WAP

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.j pg','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','sat urday.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/

Oct 3 '05 #1
0 1062

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: me | last post by:
Hey all, well i am also a newbie :) i saw this on many sites: <img src="somephp.php?blabla" width="100"> how can i make that to? i want to reffer to a php file that returns or prints a jpg...
7
by: Henri Schomäcker | last post by:
Hi folks, I got a windows com executable which returns a jpg image in a BSTR. Let's say, the var that holds the data is $imgData. With perl, in a cgi script, I may simpy write:...
2
by: Henri Schomaecker | last post by:
Hi folks, I'm still having the problem that I don't know how I can print the data of a jpeg image. I got the imagedata as return-value from a COM object. The imagedata are hold in a Variant...
1
by: Jason | last post by:
For some reason, most but not all reports printing from an access application our client is using will not print any images on the reports or forms. One report will print the image and data...
24
by: Rhino | last post by:
I am dabbling with print CSS for the first time and I need some guidance. The web pages on my site look fine - to my untrained eye - when displayed on the monitor in any of the standard browsers....
0
by: Sergei Shelukhin | last post by:
I need to generate an image to print on a small card (15cm x 5cm), the image will be cut from the standart a4 sheet; it was done by MS Access proggie before and I'm rewriting it into ASP.NET. I...
5
by: Brad Pears | last post by:
I have the following code which I was using to print .pdf's. It worked fine and actually printed the pdf file. Now I want to use the same code to print a .jpg file. When I run the code, it...
1
by: dpowc | last post by:
How do I print a background image? I read another article that says as long as print background becomes a default for IE settings, we need to "cheat" a little to print a site as close to what we see...
0
by: Axeman | last post by:
I have an ASP.NET webapp that needs to view and print several different image formats (JPG, TIFF, BMP, etc.). In addition, it also needs to view/print PDF files. I have successfully implemented the...
1
by: eqiz | last post by:
I'm looking for a way to print stuff from my program. I have searched and searched for a way to print and the only thing I have found is PrintFORM which only takes a picture of the form and prints it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.