The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
WML via PHP?
Discuss WML via PHP? in the PHP Development forum on Dev Shed. WML via PHP? PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 7th, 2000, 11:30 AM
|
|
Junior Member
|
|
Join Date: Mar 2000
Location: Vienna, Austria
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I'm just a beginner with Apache, PHP and MySql. My goal is to set up a WML-server, what is no problem when using static pages. Where I could not get until now is to use PHP to create dynamic WML pages. Is that possible? An how?
|

March 7th, 2000, 01:07 PM
|
|
Contributing User
|
|
Join Date: Apr 1999
Posts: 114
Time spent in forums: 42 m 44 sec
Reputation Power: 15
|
|
Hi,
PHP and Apache don't care at all what type of client-side code you use. So for HTML you might code in PHP:
echo ("<html><body>My page</body></html>");
You could just as easily have PHP generate WML code:
echo ("<wml><card id="begin" title="Home"><p>My card</p></card></wml>");
I was just surprised to read that you're using an HTTP server like Apache. I thought that WML applications use a WAP server like the Nokia WAP Server ( http://www.nokia.com/wap/products.html ). Am I wrong? Do people also serve WML via HTTP?
-- Christopher
[This message has been edited by scollo (edited March 07, 2000).]
|

March 8th, 2000, 05:20 AM
|
|
Contributing User
|
|
Join Date: Dec 1999
Location: Netherlands
Posts: 77
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
As far as I know about WAP, you host the WML pages on a HTTP server, but you need a Gateway to binary encode the pages and send them to the mobile phone.
The gateway is the tricky commercial part in it!
Peter
|

March 8th, 2000, 08:42 AM
|
|
Junior Member
|
|
Join Date: Mar 2000
Location: Vienna, Austria
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by scollo:
Hi,
PHP and Apache don't care at all what type of client-side code you use. So for HTML you might code in PHP:
echo ("<html><body>My page</body></html>");
You could just as easily have PHP generate WML code:
echo ("<wml><card id="begin" title="Home"><p>My card</p></card></wml>");
I was just surprised to read that you're using an HTTP server like Apache. I thought that WML applications use a WAP server like the Nokia WAP Server ( http://www.nokia.com/wap/products.html ). Am I wrong? Do people also serve WML via HTTP?
-- Christopher
[This message has been edited by scollo (edited March 07, 2000).][/quote]
In the meantime I learned a lot about Apache and PHP. And yes, it's absolutely possible to use Apache as WAP server.
Bernhard
|

March 8th, 2000, 09:09 AM
|
|
Junior Member
|
|
Join Date: Mar 2000
Location: Kongsberg
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by BMager:
I'm just a beginner with Apache, PHP and MySql. My goal is to set up a WML-server, what is no problem when using static pages. Where I could not get until now is to use PHP to create dynamic WML pages. Is that possible? An how?[/quote]
Hi.
you should send a header field with the right mimetype:
<?php
header("Content-Type: text/x-wap.wmlnn");
?>
if you have enabled the <? ?> tags in php3, you'll have to write the leading <?xml> tag with echo ""; or something.
regards. larsw.
------------------
Lars Wilhelmsen
Buskerud College,
Department of Computer Science,
Faculty of Engineering,
Kongsberg, Norway
|

March 8th, 2000, 09:35 AM
|
|
Junior Member
|
|
Join Date: Mar 2000
Location: Hamburg, Germany
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Right, Apache+php is the best way to use WML (because of header tag) if the provider's server is still not ready for .wml-extention.
<?php 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">";
$DECK = "<wml> <card> <p>Hello, World</p></card></wml>";
echo $DECK;
?>
Best regards
Konstantin
http://www.waply.com
WAP Portal + Search Engine
[This message has been edited by Kostik (edited March 08, 2000).]
|

March 8th, 2000, 10:12 AM
|
|
Junior Member
|
|
Join Date: Mar 2000
Location: Milton Keynes, Bucks, UK
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
A WAP Server kit costs £180,000 (U.K.).
Don't quote me on that as I will check my source a.s.a.p.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|