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 March 25th, 2005, 01:10 AM
utsboy utsboy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Jakarta
Posts: 16 utsboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 22 m 26 sec
Reputation Power: 0
Send a message via Yahoo to utsboy
WAP page not compatible in Nokia..

Dear Guys...
Are there some incompatibility problems when we write wap especially dynamic page which written in wml embedded with php.
Caused I found that my script works fine in alcatel which has open wave as it browser, but failed when I tried with Nokia.
By the way I used open wave sdk when I wrote the script.
So what should I do, so theres wont be incompatibility problem
with my script.
Please guys, I woud be very appreciate for any input from you all. Thx..

And this is my script :

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

<wml>
<card id="Lagu" title="Daftar Lagu">
<p align = "center">
<?

function pageBrowser($totalrows,$numLimit,$amm,$numBegin,$begin,$num) {

$larrow = "&nbsp;<< Prev ".$numLimit."&nbsp;";
$rarrow = "&nbsp;Next ".$numLimit." >>&nbsp;";
$wholePiece = "Page: ";

if ($totalrows > 0) {
$numSoFar = 1;
$cycle = ceil($totalrows/$amm);
if (!isset($numBegin) || $numBegin < 1) {
$numBegin = 1;
$num = 1;
}
$minus = $numBegin-1;
$start = $minus*$amm;
if (!isset($begin)) {
$begin = $start;
}
$preBegin = $numBegin-$numLimit;
$preStart = $amm*$numLimit;
$preStart = $start-$preStart;
$preVBegin = $start-$amm;
$preRedBegin = $numBegin-1;
if ($start > 0 || $numBegin > 1) {
$wholePiece="<a href='?num=".$preRedBegin."&numBegin=".$preBegin."&begin=".$preVBegin."'>".$larrow."</a>\n";
}
for ($i=$numBegin;$i<=$cycle;$i++) {
if ($numSoFar == $numLimit+1) {
$piece = "<a href='?numBegin=".$i."&num=".$i."&begin=".$start.$queryStr."'>".$rarrow."</a>\n";$wholePiece.= $piece;
break;
}
$piece = "<a href='?begin=".$start."&num=".$i."&numBegin=".$numBegin."'>";
if ($num == $i) {
$piece .= "</a><b>$i</b><a href=''>";
} else {
$piece .= "$i";
}
$piece .= "</a>";
$start = $start+$amm;
$numSoFar++;
$wholePiece .= $piece;
}
$wholePiece .= "\n";
$wheBeg = $begin+1;
$wheEnd = $begin+$amm;
$wheToWhe = "<b>".$wheBeg."</b> - <b>";
if ($totalrows <= $wheEnd) {
$wheToWhe .= $totalrows."</b>";
} else {
$wheToWhe .= $wheEnd."</b>";
}
$sqlprod = " LIMIT ".$begin.", ".$amm;
} else {
$wholePiece = "Sorry, no records to display.";
$wheToWhe = "<b>0</b> - <b>0</b>";
}

return array($sqlprod,$wheToWhe,$wholePiece);
}


include("inc/begin.inc");

$scores = mysql_connect("$host","$user","$pass");
$db = mysql_select_db("$database");
$criterea = " WHERE catagory='06' AND mstate='0'";
$sql = "SELECT COUNT(*) AS totalrows FROM music";


$arr = mysql_fetch_array(mysql_query($sql));

$navigate = pageBrowser($arr[totalrows],4,4,$_GET[numBegin],$_GET[begin],$_GET[num]);
$sql = "SELECT smid,singer,title FROM music".$criterea.$navigate[0];
$rs = mysql_query($sql);

echo "<br/>Listing ".$navigate[1]." of ".$totalrows." results.<br/><br/>";
//echo "<br/>".$navigate[2]."<br/>";
while ($arr = mysql_fetch_array($rs)) {
print "$arr[smid],$arr[singer],$arr[title]<br/><br/>";
}
print "<small><br/>$navigate[2]<br/></small>";

?>
</p>
</card>
</wml>



Regards,
utsboy

Reply With Quote
  #2  
Old March 29th, 2005, 08:09 AM
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
Difficult to tell as you have so much generated code.
Can you get the outputted - source code, eg: can you view this page in firefox or opera on your machine, do you have a link to the page online?
__________________
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 March 29th, 2005, 08:39 AM
utsboy utsboy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Jakarta
Posts: 16 utsboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 22 m 26 sec
Reputation Power: 0
Send a message via Yahoo to utsboy
Re: WAP page not compatible in Nokia...

Dear Jabba,
First of all thx for your attention Bro...
This is my experimental links..
http://202.59.162.138/list6.php

I dont know what is the problem with it... n until know Iam still very curious.
Please let me know.. Once more Thx.. again bro

Regards,
utsboy

Reply With Quote
  #4  
Old March 29th, 2005, 01:20 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
Quote:
wmlbrowser error

wmlbrowser found an error trying to load this document.

The error was:

XML Parsing Error: undefined entity Location: about:blank Line Number 6, Column 571:


In plain english:
I think it may be the spaces, "&nbsp;" around the next anchor.
I got the page to display if I changed that.

Reply With Quote
  #5  
Old April 1st, 2005, 04:34 PM
utsboy utsboy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Jakarta
Posts: 16 utsboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 22 m 26 sec
Reputation Power: 0
Send a message via Yahoo to utsboy
Re: WAP page not compatible in Nokia...

Dear Guys, thx for the replies....
I just found the problem with winwap browser its very useful.
Yups wml is very difference even we use php embedded with.
I change all of the links and i got it works...
$piece = "<a href='list6?begin=".$start."&num=".$i."&numBegin=".$numBegin."'>";

Regards,
Utsboy

Reply With Quote
  #6  
Old April 28th, 2005, 04:36 PM
luk luk is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 2 luk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 27 sec
Reputation Power: 0
Quote:
Message # 1013612:
Date: 10/01/02 18:00
By: Johnny Profile
Subject: wml + php solution...

Hi All!

I found an interesting diference between my solution and this article.
Almost everything is the same, but when i'm using the
header (Content-Type: text/vnd.wap.wml); function, my phone says "Response unknown" or "No response, try again"
I have Nokia 6510 mobile.
So I don't use the header function and everything works well

Here is my sample code what I use.

<?php
echo "<?xml version\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>

<wml>
<card id="main" title="First Wap page">
<p>Here is a php number:
<?php $i=1; echo $1;
<br/>
</p>
</card>
</wml>

Thats all.
Bye.

http://www.phpbuilder.com/annotate/message.php3?id=1013612


I have Nokia6100 and i get the same error with some WML scripts.I can't imagine what the problem is.If anyone can help me(us) please post it here al their experience ( knowledge ) about this problem.

WAP Chats :

MobiiliChat 1.07
Code:
http://www.mobiilichat.com/forum/mobiilichat_v1.07.zip


W@Pchat Ver.1.2
Code:
http://www.earthweb.biz/myscript.php?file=wapchat.zip


GumSlone WAP Chat2 and 1.05
Code:
http://gumslone.com/scripts/wap_chat_v2.zip
http://gumslone.com/scripts/GS_WAP_CHAT_V1.0.5.zip



I have install it in my PC Apache + PHP + MySQL with WML support.All in one package : XAMPP for WINDOWS

Quote:
http://www.apachefriends.org/en/xampp-windows.html


All 3 WML scripts works with WINWAP 3.2
Quote:
http://www.winwap.com/products_2_1.php



BUT IN MY NOKIA6100 just MobiiliChat works 100%.The rest 2 scripts didn't work ,and i get "File Format Unknow" ERROR.

Look the 3 WML script header functions :

MobiiliChat 1.07
Quote:
header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");




W@Pchat Ver.1.2
Quote:
header("Content-type: text/vnd.wap.wml");




GumSlone WAP Chat2 and 1.05
Quote:
header("Content-type:text/vnd.wap.wml;charset=UTF-8");



It might be possible to be this header problem? MobiiliChat 1.07 works 100% for me, bust rest 2 NOT WORK !

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreMobile Programming > WAP page not compatible in Nokia..


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 4 hosted by Hostway
Stay green...Green IT