Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

WAP and PHP (for gravity or other)

Posted on 2000-05-03
6
Medium Priority
?
247 Views
Last Modified: 2008-03-06
I'm trying to develop WAP applications with PHP.

Does anyone have any ideas about how to configure the
Apache Web Server in order to use WML and PHP.
I've tried some configuration but it doesn't seem to work.

Besides, in all wml pages I have  <?xml version="1.0"?>. PHP doesn't like...:)
0
Comment
Question by:us111
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:chkassen
ID: 2783753
Hi us111

first you should check that you have enabled long tags "<?php" otherwise php will not work.

The next thing you should check to do is print out the right content-type with
 <?php header("Content-Type: text/vnd.wap.wml; charset=iso-8859-1"); ?>

Hope this helps

--
chkassen
0
 
LVL 2

Accepted Solution

by:
gravity earned 400 total points
ID: 2784301
Hey Dude,

I have this header at the top of all my WAP documents :

<?
        header("Content-type: text/vnd.wap.wml");
        echo '<?xml version="1.0"?>';
        echo "\n";
        echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
        echo "<wml>\n";
?>
0
 
LVL 2

Expert Comment

by:gravity
ID: 2784305
BTW chkassen, you're wrong. PHP will work with :

<? ?>
<?php ?>
<script language="php">
</script>

There are probably more but they all work...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Author Comment

by:us111
ID: 2784492
Thanks!
I will check next tuesday. Long week-end.
0
 
LVL 1

Expert Comment

by:chkassen
ID: 2784517
Yes gravity you're right it works the way you wrote but when you have XML files it doesn't.

--
chkassen
0
 
LVL 2

Expert Comment

by:gravity
ID: 2784639
us111 : A word of advice - don't use method="post" for any form or link - on Nokia's own gateways it tends to disagree with the phones...

chkassen : Fair point, I wasn't thinking XML :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses how to implement server side field validation and display customized error messages to the client.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question