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
Solved

WAP and PHP (for gravity or other)

Posted on 2000-05-03
6
234 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
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
PHP Query return divisible by 3 3 26
hbo knew my windows software 4 62
reverse engineer .sql from php files 11 35
PHP: Best way to scan folders and process files 10 40
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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…

828 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