?
Solved

WAP and PHP (for gravity or other)

Posted on 2000-05-03
6
Medium Priority
?
244 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

777 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