PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 7th, 2000, 11:30 AM
BMager BMager is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Vienna, Austria
Posts: 3 BMager User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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?

Reply With Quote
  #2  
Old March 7th, 2000, 01:07 PM
scollo scollo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 1999
Posts: 114 scollo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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).]

Reply With Quote
  #3  
Old March 8th, 2000, 05:20 AM
PAV PAV is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Location: Netherlands
Posts: 77 PAV User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #4  
Old March 8th, 2000, 08:42 AM
BMager BMager is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Vienna, Austria
Posts: 3 BMager User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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


Reply With Quote
  #5  
Old March 8th, 2000, 09:09 AM
dizzy_p dizzy_p is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Kongsberg
Posts: 1 dizzy_p User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #6  
Old March 8th, 2000, 09:35 AM
Kostik Kostik is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Hamburg, Germany
Posts: 1 Kostik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Kostik
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).]

Reply With Quote
  #7  
Old March 8th, 2000, 10:12 AM
cknight_porsche cknight_porsche is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Milton Keynes, Bucks, UK
Posts: 1 cknight_porsche User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > WML via PHP?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap