Trading Applications Developer (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume

Introduction to WML, Apache, and PHP
Working on a website for my company, I discovered the need for wireless access to my email, stocks and such. Not wanting to pay someone else to give me this information, I decided to develop a wireless site. The information to do this is available on the internet, but it is scattered and hard to come across. I needed the ability to run php scripts, access databases, and other functions that I needed PHP to do for me. This article covers the basics of wml, how to set up your apache server, and php. Covering the basics allows you to set up this environment and then learn the rest on your own.
Requirements
You will need a little experience with the Apache Web Server, Php and html. As for system requirements, I am using apache 1.3.9, php3, and Red Hat Linux 6.0 for this demonstration. I don't see any problems with setting this up on a windows machine running Apache, and PHP3 or PHP4.
In this article, I am going to walk you through the following areas; intro to wml, setting up apache for wireless appications, and creating your first WML/PHP page. Much of this information has been gathered from across the internet, and some I learned as I tried to put together a working site.
Intro to WML
WML stands for Wireless Markup Language. WAP phone or similar devices are used to view pages written in WML. WML is similar to XML based on it's syntax and scrictness. Anybody who has used html will have no problem learning WML. Many tags and attributes are the same, but there are fewer tags. WML allows the programmer to use variables that allow you to create dynamic content, although for this article we are going to use php as the dynamic language.
WML Basics
In WML you can use many sub-pages (called 'cards') in one WML page (called a 'deck'). Each WML card works like a web page and its content is displayed to the user. The following will be our first example of a .wml page. On my server, I saved this file in ~/wireless/home.wml.
<wml>
<card id='home'>
<p>
My first Test page
</p>
</card>
</wml>
Unlike HTML, if you do not close your tags, e.g. <wml> </wml> then, your script will not compile correctly. The example above will create a simple test message on any wireless device that says "My first Test page".
[ Next Page ]


Comments:
RE: Invoke PHP from WML scriptgrrat mike05/19/08 04:31
good manualMiguel12/17/07 23:00
Invoke PHP from WML scriptKalpesh05/21/07 06:49
Lack of informationDesmond04/25/07 07:15
RE: Solution: wml+apache+php4jack02/10/06 03:09
RE: Solve WML problems hereaskali mohamed11/28/05 13:16
Solve WML problems hereGreg Robbins10/27/05 03:54
HawHaw ClassJonathan Cutrer09/12/05 22:41
wap forum scriptErnie09/11/05 09:02
WML Link ProblemBiranchi Narayan Mohapatra08/11/05 02:54
Integrate php into websphereSuwit 07/29/05 09:53
PHP Content-Dispositioncyril06/30/05 09:41
RE: How to run php in appache server ?siva04/29/05 03:48
RE: cant use the include PHP commandJay04/02/05 05:46
PHP+WML problemubaid02/17/05 06:00
Apache and PHP Install HOWTOThangalin02/15/05 03:41
RE: PHP & WMLelhouma02/05/05 05:58
How to use mailshazzad01/05/05 05:06
cyber cafe management software Mpeirwe11/24/04 12:29
RE: Any server can be a WAP server ?Chiral Software02/09/04 15:57
RE: Setting up apache for WML on shared serverMiss.Spark01/08/04 00:15
PHP & WMLDaniel Stirling06/19/03 13:09
Works fine for meKevin05/07/03 12:04
read if you need help installing apache linuxMichael Olsen02/16/03 12:33
RE: PHP & WebSpherekrylor01/12/03 22:15
WML and PHP short opening tag...Edwin Zuidema01/03/03 04:24
PHP & WebSpheremathy paesen10/17/02 09:28
i no nothingkong10/16/02 03:29
Manual de PHPFernando Zamarripa Rodriguez10/15/02 10:38
Manual de PHPFernando Zamarripa Rodriguez10/15/02 10:25
RE: PHP Starting tutorialClarke Drover10/02/02 12:40
wml + php solution...Johnny10/01/02 18:00
Mandrake 8.2 + apache + phpSpencer09/30/02 09:59
RE: PHP Starting tutorialmeenu chugh09/23/02 08:16
RE: It works with wml but not wml/phppeter garner09/16/02 10:59
RE: another wml php problemPan09/13/02 02:29
I have a problem... I'm trying to put........Tom09/02/02 11:56
RE: PHP Starting tutorialSam09/01/02 03:51
Capacity PlanningBiohazard07/28/02 08:11
RE: How to run php in appache server ?joe07/16/02 11:56
wml files with phpJose Garcia07/10/02 10:12
RE: Doing redirection with PHPJin07/04/02 14:46
Solution: wml+apache+php4Erik Lonroth07/04/02 05:54
Ayuda por favorLancer_07/01/02 10:59
RE: PHP Starting tutorialKAMTO YOUMBI EVARISTE LEOPOLD07/01/02 06:11
RE: how to install php in linux mandrakeElwaleed Elbashier06/28/02 07:37
Wap forum (message board) scriptChris06/15/02 16:00
RE: another wml php problemRichard D. Williams06/13/02 12:20
RE: another wml php problemkenneth05/24/02 04:11
another wml php problemSam05/23/02 06:45
Apache SEND MAIL !!!!Syman05/22/02 09:46
php+wml newcomerSam05/20/02 10:57
need helpvshield05/18/02 00:03
wml,php,mysql.Need help!pitza calin05/15/02 13:47
you can just use *.php tooHanzel05/14/02 11:30
cant use the include PHP commandBrutal_truth04/29/02 20:20
How to PHPAzam04/29/02 07:26
RE: HELP WITH MIME OF APACHE and jspwael al hasan04/22/02 08:26
xml to wap using phplokman04/16/02 23:48
How to run php in appache server ?sajith04/11/02 02:34
RE: PHP/WML problemRobert Bares (b-w-d.net)03/24/02 08:51
php newbiefarah03/20/02 22:49
php editormynn03/10/02 22:34
Re: Manual de PHPRosana Zambrano02/26/02 17:58
how to install php using php windows installeharikrishna02/18/02 13:46
RE: Browser doesn't show php resultstigger01/26/02 14:31
HELP WITH MIME OF APACHEaasim01/25/02 18:06
i need some articles and magazines about wapMuhammad Aslam Baig01/24/02 02:31
PHP/WML problemtigger01/23/02 10:39
how to install php in limux mandrakeFauzi01/18/02 12:08
preguntaHermy01/12/02 09:37
preguntaHermy01/12/02 09:14
kickout rewritehendrik01/07/02 17:44
It works with wml but not wml/phpAndreas Amsenius01/05/02 12:45
How to insert data to mysql from WAP?tom12/27/01 12:47
How to insert data to mysql from WAP?tom12/27/01 12:38
RE: PHP free space for WMLBrian12/20/01 19:18
statisticsMr Solsona12/17/01 07:44
RE: WMLScriptamarnath12/11/01 00:46
please!!!yh.y12/07/01 20:39
RE: Browser doesn't show php resultsumeshkumar12/04/01 05:11
Execute an apache script in phphugo12/03/01 07:42
WAP, PHP, and POSTkyle11/22/01 19:10
RE: This doesnt work for me either...kyle11/22/01 17:44
Need help from a newbieAlfredo10/26/01 22:17
Please someone help me!!Fadi10/18/01 02:20
Browser doesn't show php resultsDave Teu09/21/01 06:42
It wont work no matter what!!! Help?Charles K09/20/01 09:14
WMLScriptIgor09/06/01 01:08
requestuday08/16/01 04:00
PHP to generate dynamic XML pagesAntoine Trannoy08/06/01 05:19
PHP Starting tutorialPrashant07/27/01 22:53
RE: PHP free space for WMLHellek07/18/01 06:46
thanksmozaffar07/16/01 01:27
questionoliver06/27/01 00:03
Re: A better mod_rewrite set upDennis Bath06/14/01 23:00
Mod_rewrite set up a problemDennis Bath06/14/01 20:46
PHP free space for WMLtonino_forma06/13/01 02:40
method not allowedjane06/12/01 01:27
help!Disfasia06/08/01 00:56
Send IP packet with wml?Charles de La Ferriere05/22/01 05:25
RE: Any server can be a WAP server ?Hythian05/15/01 07:37
mod_rewrite.so?Henry Malthus05/15/01 00:02
RE: This doesnt work for me either...Todd04/27/01 18:29
RE: Doing redirection with PHPpoetic04/17/01 18:57
Setting up apache for WML on shared serverchad nantais04/17/01 02:30
A better mod_rewrite setup for someDuncan Kimpton04/01/01 16:21
RE: This doesnt work for me either...Duncan Kimpton04/01/01 11:30
FATAL Error from <?xml version="1.0"?>Wes03/26/01 11:16
RE: This doesnt work for me either...Ke Xu03/23/01 13:31
RE: clearing input boxAdnan Siddiqi03/08/01 11:12
clearing input boxmaha03/07/01 12:35
Physical connectionsNeville02/22/01 02:05
WAP To Apache: READ THISMichael Welch02/18/01 18:27
basic steps in setting up the wap sitesreekanth02/09/01 08:10
WorksJesse02/07/01 09:22
RE: This doesnt work for me either...Joe Jenkins02/06/01 08:38
RE: This doesnt work for me either...Mike Johnson02/06/01 07:36
RE: This doesnt work for me either...Pam Joseph02/05/01 12:12
More optionsDel02/03/01 15:35
RE: The nice part...Joe02/03/01 09:39
RE: more than one WML page?Mike Johnson02/02/01 18:37
Connection to service failedJesse02/02/01 15:11
more than one WML page?Joe Jenkins02/01/01 17:31
This doesnt work for me...Joe Jenkins02/01/01 13:54
RE: Any server can be a WAP server ?Sid01/31/01 06:47
RE: Some hints...Andrew Spiers01/28/01 16:13
Some hints...Oliver Blasnik01/27/01 04:55
RE: Any server can be a WAP server ?Gareth Bromley01/27/01 04:21
RE: Doing redirection with PHPMatthijs Tempels01/25/01 15:02
A title might come in handyPablo01/25/01 09:47
RE: Doing redirection with PHPNeil Moomey01/23/01 10:40
RE: Any server can be a WAP server ?Mike Johnson01/19/01 22:51
Any server can be a WAP server ?jaydj01/19/01 19:00
RE: The nice part...Tom Anderson01/19/01 18:36
The nice part...Benjamin Smith01/19/01 17:09
RE: Doing redirection with PHPTom Anderson01/19/01 13:51
Thanks for the article!Tom Anderson01/19/01 13:50
RE: read a french exemple wml/php/mysqlPatrick01/19/01 11:30
read a french exemple wml/php/mysqlmarc 01/19/01 02:58
The WML is wrong in these examplesAndrew Spiers01/06/01 15:52
Doing redirection with PHPCoolvibe01/05/01 10:17
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.