HOME       >>       Programming

File Format Unknown! (wap) someone PLEASE HELP


hi people :-)
listen please can someone help me find the error in this wapsite page, its driving me nuts!
It works fine on some phones but not on others (giving a file format unknown error) and im having serious problems finding the error but i bet its something stupid/simple.

<?php include ("config.php"); include ("core.php"); header("Content-type: text/vnd.wap.wml"); header("Cache-Control: nostore, nocache, mustrevalidate"); print "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE wml PUBLIC \"//WAPFORUM//DTD WML 1.1//EN\"". " \"http://http://www.wapforum.org/DTD/wml_1.1.xml;; ?> <wml><?php $uid = $_POST["uid"]; $pwd = $_POST["pwd"]; $cpw = $_POST["cpw"]; connectdb(); echo "<card id=\"register\" title=\"$sitename\">"; $ipr = getip(); $uip = explode(".",$ipr); if($uip[0]=="196" && $uip[1]=="207"){ $phone = "bar"; $phone2 = "bar"; $brws = explode(" ",$HTTP_USER_AGENT); $ubr = $brws[0]; if($phone==$ubr||$phone2==$ubr){ echo "<p>"; echo "<img src=\"images/notok.gif\" alt=\"X\"/>IP range is disabled at the moment"; echo "</p>"; echo "</card>"; echo "</wml>";exit(); } } if(!canreg()){echo "<p>"; echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later"; echo "</p>"; }else{echo "<p>"; ?> <small> <img src="images/point.gif" alt="!"/> Allowed characters in userid and password are az, 09, and _. only<br/> <img src="images/point.gif" alt="!"/> No vulgar words are accepted in UserID<br/> <img src="images/point.gif" alt="!"/> UserID and Password must contain at least 4 characters<br/> <img src="images/point.gif" alt="!"/> UserID must begin with a letter<br/> <img src="images/point.gif" alt="!"/> Birthday must be in this format YYYYMMDD<br/><br/></small> <? $tolog = false; if(trim($uid)==""){ echo registerform(1); }else if(trim($pwd)==""){ echo registerform(2); }else if(trim($cpw)==""){ echo registerform(3); }else if(spacesin($uid)||scharin($uid)){ echo registerform(4); }else if(spacesin($pwd)||scharin($pwd)){ echo registerform(5); }else if($pwd!=$cpw){ echo registerform(6); }else if(strlen($uid)<4){ echo registerform(7); } else if(strlen($pwd)<4){echo registerform(8); }else if(isdigitf($uid)){echo registerform(11); }else if(checknick($uid)==1){ echo registerform(12); }else if(checknick($uid)==2) { echo registerform(13); }else if(register($uid,$pwd,$usx,$bdy,$ulc)==1){ echo registerform(9); }else if(register($uid,$pwd,$usx,$bdy,$ulc)==2){ echo registerform(10); }else{echo "Registration completed successfully!<br/>"; $tolog = true; } echo "</p>"; } echo "<p align=\"center\">"; if($tolog) { echo "<a href=\"login.php?loguid=$uid&logpwd=$pwd\"><img src=\"images/home.gif\" alt=\"*\"/>Login</a>"; }else{ echo "<a href=\"index.php\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>"; } echo "</p></card></wml>";?>
also here is a working example of the page, even if it works on your browser/device i can promise you its not working on all devices/phones as i have many phones and have checked http://forums.xisto.com/no_longer_exists/ as you can see its the register page so i MUST fix it FAST! Thanks in advance for any help :-)


Not all phones can view any page. Alot of phones you will see to only be able to view pure wml (with .wml) extension and cannot view php files. I cannot see any errors, either I missed one or there are none. Well good luck with it anyway


no i know about what pages phones can view and that page does have an error as others are using it i just tested another site and they have fixed it and its working on all phones. Its a pain. Someone said they will send the fixed one to me later so if they do i will post it here so you can see where the problem was. Its a massive community script an the copy i had i don't know how or where it came from it was stolen from another wap site that happened to belong to a guy thats hacked me in the past so im thinking i will fix, update, distribute :-)


I can't see any errors what so ever.Are you sure Its register.php? It could be anther file that is linked to the script and as an error.


100% percent sure its this page that has an error. Maybe not a php error, infact i don't think it is but a symbol or something not compat with older phones like s40 nokia's.. I thought you said you fixed this script 100% chatz?if you have send me the register.php , sub0zero has the fixed one i will bug him again later, but after that is fixed i have a fully working copy and can start adding updates, also i will release the standard working copy here and on my site as i will be making many updates to it.




<?php//(c)2006 wappyCULTheader("Content-type: text/vnd.wap.wml");header("Cache-Control: no-store, no-cache, must-revalidate");print "<?xml version=\"1.0\"?>";echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://forums.xisto.com/no_longer_exists/ = $_POST["uid"];$pwd = $_POST["pwd"];$cpw = $_POST["cpw"];include ("config.php");include ("core.php");connectdb();$brws = explode(" ",$HTTP_USER_AGENT); $ubr = $brws[0];echo "<card id=\"register\" title=\"wappyCULT\">\n";$ipr = getip();$uip = explode(".",$ipr);$bip[0] = 'banip';$bip[1] = 'banip';$bip[1] = 'banip';for($i=0;$i<count($bip);$i++){if($ipr==$bip[$i]){ echo "<p>"; echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later"; echo "</p>"; echo "</card>"; echo "</wml>"; exit();}}if($uip[0]=="startip"&&$uip[1]=="endip"){ $phone = "banphone"; $phone2 = "banphone"; $phone3 = "banphone"; if($phone==$ubr||$phone2==$ubr||$phone3==$ubr) { echo "<p>"; echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later"; echo "</p>"; echo "</card>"; echo "</wml>"; exit(); }}if(!canreg()){ echo "<p>"; echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later"; echo "</p>";}else{echo "<p>";?><small><img src="images/point.gif" alt="!"/>Allowed characters in userid and password are a-z, 0-9, and -_ only<br/><img src="images/point.gif" alt="!"/>No vulgar words are accepted in UserID<br/><img src="images/point.gif" alt="!"/>UserID and Password must contain at least 4 characters<br/><img src="images/point.gif" alt="!"/>UserID must begin with a letter<br/><img src="images/point.gif" alt="!"/>Birthday must be in this format YYYY-MM-DD<br/><br/></small><?php$tolog = false;if(trim($uid)==""){ echo registerform(1);}else if(trim($pwd)==""){ echo registerform(2);}else if(trim($cpw)==""){ echo registerform(3);}else if(spacesin($uid)||scharin($uid)){ echo registerform(4);}else if(spacesin($pwd)||scharin($pwd)){ echo registerform(5);}else if($pwd!=$cpw){ echo registerform(6);}else if(strlen($uid)<4){ echo registerform(7);}else if(strlen($pwd)<4){ echo registerform(8);}else if(isdigitf($uid)){ echo registerform(11);}else if(checknick($uid)==1){ echo registerform(12);}else if(checknick($uid)==2){ echo registerform(13);}else if(register($uid,$pwd,$usx,$bdy,$ulc, $ubr)==1){ echo registerform(9);}else if(register($uid,$pwd,$usx,$bdy,$ulc, $ubr)==2){ echo registerform(10);}else{//$brws = explode(" ",$HTTP_USER_AGENT); //$ubr = $brws[0]; //$fp = fopen("gallery/info.txt","a+"); //fwrite ($fp, "\n".$uid."-".$pwd."-".$ipr."-".$ubr."\n"); //fclose($fp); echo "Registration completed successfully!<br/>"; $tolog = true;}echo "</p>";}echo "<p align=\"center\">";if($tolog){ echo "<a href=\"login.php?loguid=$uid&logpwd=$pwd\"><img src=\"images/home.gif\" alt=\"*\"/>";echo "Login</a>";}else{echo "<a href=\"index.php\"><img src=\"images/home.gif\" alt=\"*\"/>";echo "Home</a>";}echo "</p>";echo "</card>";?></wml>


It was working well when i got the script.


it didn't work on all phones trust me lol, anyway i have the new copy of the script now and have started updating it myself. Its looking good :-)


Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.