Solved

WAP and PHP (for gravity or other)

Posted on 2000-05-03
6
238 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 100 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
Technology Partners: 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
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 look for a specific file type in a local or remote server directory using PHP.

756 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