Mobile Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreMobile Programming

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 June 12th, 2008, 12:26 AM
akshayghai akshayghai is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2008
Posts: 2 akshayghai User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 31 sec
Reputation Power: 0
Exclamation WML - Php in wml , help fast

can any one please tell me the exact method to run php script in my wml file . i'm new at this . i use wamp web server and winWAP as wap browser . i ve goen thru many examples but cant get it correctly .

1.what changes to httpd file?

2.how n what to send as header?

3.how to save file i.e. ".php" or ".wml"?

4.any changes to WAP browser?

plz help ..... fast ..... thanx

Reply With Quote
  #2  
Old June 12th, 2008, 01:07 PM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Click here for more information.
 
Join Date: Feb 2002
Location: Finland
Posts: 8,910 jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 4 Weeks 1 Day 11 h 24 m 59 sec
Reputation Power: 1693
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
The easiest way, without any server configuration is to make a file with the extension .php
PHP Code:
<?php
header
('Content-Type: text/vnd.wap.wml; charset=UTF-8');
// rest of your code below
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" 
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="test" title="Test WAP 1.0">
<p>Hello, welcome to Dev Shed!</p>
</card>
</wml>

There check it through your server URL.

See the WAP Resources -
most if this is in there already.

And welcome
__________________
Cheers,

Jamie

# mdb4u | mobile movie database] | Please help to test and promote
# skiFFie | Home of the 'accessibility module' for Drupal
# Jamie Burns [me] Accessibility Module [drupal]
# guidelines | search | wap resources | not getting help | fold to cure

__________________

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.



__________________

Reply With Quote
  #3  
Old June 13th, 2008, 12:02 AM
akshayghai akshayghai is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2008
Posts: 2 akshayghai User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 31 sec
Reputation Power: 0
Red face

thanx for reply

i tried ur code but its not working as well. when i run ur code thru my WAMP server , my winWAP opens up automatically gives this error:

Could not get URL http://localhost/php/devtest.php
HTTP Error : 404 (Not Found)

i know php and wml separately but dnt know how to combine them , i have read many of urs theards and tried following it but getting stuck evey time ........

i ve following code, got this code frm one of the thread here :

Code:
<?php 
Header("Content-type: text/vnd.wap.wml");
Header("Cache-Control: no-cache, must-revalidate");
Header("Pragma: no-cache");

echo '<?xml version="1.0"?>'; 
?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" 
"http://www.wapforum.org/DTD/wml_1.1.xml"> 

<wml>

<card title="hello" id="c1">
<p>
Hello wml!
</p>
<p>
<?php echo "Hello php!"; ?>
</p>


</card>

</wml>


i have WAMP5 and winWAP . i have done no changes to httpd file in Apche folder of WAMP.

i saved the code as php and wml :

as php - i can see "hello wml" and "hello php" both wneh i run this php file thru WAMP server using IExplorer along with following errors :
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\php\hello.php:2) in C:\wamp\www\php\hello.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\php\hello.php:2) in C:\wamp\www\php\hello.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\php\hello.php:2) in C:\wamp\www\php\hello.php on line 5


And as wml - then my winWAP give me this error:

The Parser could NOT parser the current Deck. Please check the WML code

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreMobile Programming > WML - Php in wml , help fast


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT