friends atleast be kind enough to tell me what all should i change with what? i can't find any help in google tried many times. if i could i would'nt be asking for help here
Html To Wml
Collapse
X
-
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

-
please help me someone please do it for me you will get alot of blessings from me thats all i have to offer you.Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
here is somethin i tried but it don't work
<?php
include("config.php");
include("core.php");
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo("<?xml version=\"1.0\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
$bcon = connectdb();
if (!$bcon)
{
echo "<card id=\"main\" title=\"© xxxx (ERROR!)\">";
echo "<p align=\"center\">";
echo "<img src=\"images/exit.gif\" alt=\"*\"/>
";
echo "ERROR! cannot connect to database
";
echo "This error happens usually when backing up the database, please be patient, The site will be up any
minute
";
echo "Soon, we will offer services that doesn't depend on MySQL databse to let you enjoy our site, while the database is
not connected
";
echo "THANK YOU VERY MUCH";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$who = $_GET["who"];
$uid = getuid_sid($sid);
cleardata();
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_sid($sid)))
{
echo "<card id=\"main\" title=\"© xxxx\">";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>
";
echo "This IP address is blocked
";
echo "
";
echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to
log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is
over
";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE penalty='2' AND
ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));
//echo mysql_error();
$remain = $banto[0] - time();
$rmsg = gettimemsg($remain);
echo "Time to unblock the IP: $rmsg
";
echo "</p>";
echo "
";
echo "UserID: <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/>
";
echo "Password: <input type=\"password\" name=\"logpwd\" maxlength=\"30\"/>
";
echo "<anchor>LOGIN<go href=\"login.php\" method=\"get\">";
echo "<postfield name=\"loguid\" value=\"$(loguid)\"/>";
echo "<postfield name=\"logpwd\" value=\"$(logpwd)\"/>";
echo "</go></anchor>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
if(($action != "") && ($action!="terms"))
{
$uid = getuid_sid($sid);
if((islogged($sid)==false)||($uid==0))
{
echo "<card id=\"main\" title=\"© xxxx\">";
echo "<p align=\"center\">";
echo "You are not logged in
";
echo "Or Your session has been expired
";
echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
//echo isbanned($uid);
if(isbanned($uid))
{
echo "<card id=\"main\" title=\"© xxxx\">";
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>
";
echo "You are Banned
";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND
penalty='1'"));
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "Time to finish your penalty: $rmsg
";
echo "Ban Reason: $banres[0]";
//echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");
?>
<wml>
<?php
//////////////////////////////////gallery List
if($action=="gallery")
{
$who = $_GET["who"];
addonline(getuid_sid($sid),"Viewing Gallery","");
$uid = getuid_sid($sid);
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
if($who!="")
{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery WHERE uid='".$who."'"));
}else{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery"));
}
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
if($who!="")
{
$sql = "SELECT id, uid, file FROM gallery WHERE uid='".$who."' ORDER BY id DESC LIMIT $limit_start,
$items_per_page";
}else{
$sql = "SELECT id, uid, file FROM gallery ORDER BY id DESC LIMIT $limit_start, $items_per_page";
}
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$user = getnick_uid($item[1]);
$ext = getext($item[2]);
$ime = getextimg($ext);
$lnk = "<img src=\"gallery.php?id=$item[0]\" alt=\"$user\"/>
<a
href=\"../gallery/$item[2]\">$user</a>";
if(candelvl($uid, $item[0]))
{
$delnk = "<a href=\"genproc.php?action=delpic&sid=$sid& vid=$item[0]\">[x]</a>";
}else{
$delnk = "";
}
if($who!="")
{
$byusr="";
}else{
$unick = getnick_uid($item[3]);
$ulnk = "<a href=\"index.php?action=viewuser&sid=$sid& who=$item[1]\">$unick</a>";
$byusr = "- By $ulnk";
}
echo "$lnk $delnk
";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"pics.php?action=$action&page=$ppage& ;sid=$sid&who=$who\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"pics.php?action=$action&page=$npage& ;sid=$sid&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "<form action=\"pics.php\" method=\"get\">";
$rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"submit\" value=\"GO\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
$rets .= "</form>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"upload.php?action=uploader&sid=$sid\">" ;
echo "Upload Gallery Pictures</a>
";
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid& who=$who\">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a>
";
}else{
echo "<a href=\"index.php?action=stats&sid=$sid\">";
echo "<img src=\"../images/stat.gif\" alt=\"*\"/>Site Stats</a>
";
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
?>
</wml>
the error i get is
Warning: Cannot modify header information - headers already sent by (output started at /home/aaaa/domains/xxxx.com/public_html/re/try.php:1) in /home/aaaa/domains/xxxx.com/public_html/re/try.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at /home/aaaa/domains/xxxx.com/public_html/re/try.php:1) in /home/aaaa/domains/xxxx.com/public_html/re/try.php on line 5Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
please help me guys i m doin everythin to convert but im unable to
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
bomb -
that link dont work
amylee thats really very sweet of you i hope i can figure how to use the codes
amy other than those rest of the coding r fine????Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
Guest
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<?php
echo "<head>";
echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
<meta name=\"description\" content=\"Chatheaven
\">
<meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\"></head>";
$bcon = connectdb();
if (!$bcon)
{
echo "<card id=\"main\" title=\"© Chatheaven (ERROR!)\">";
echo "<p align=\"center\">";
echo "<img src=\"../images/exit.gif\" alt=\"*\"/>
";
echo "ERROR! cannot connect to database
";
echo "This error happens usually when backing up the database, please be patient, The site will be up any minute
";
echo "you can temperoray be in this site <a href=\"http://chatheaven.wen.ru\">$site_name</a> while $site_name is offline
";
echo "THANK YOU VERY MUCH";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$brws = explode(" ",$_SERVER[HTTP_USER_AGENT] );
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$who = $_GET["who"];
$uid = getuid_sid($sid);
cleardata();
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_sid($sid)))
{
echo "<card id=\"main\" title=\"© Chatheaven (ERROR!)\">";
echo "<p align=\"center\">";
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>
";
echo "This IP address is blocked
";
echo "
";
echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over
";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));
//echo mysql_error();
$remain = $banto[0] - time();
$rmsg = gettimemsg($remain);
echo " IP: $rmsg
";
echo "</p>";
echo "
";
echo "UserID: <input name=\"loguid\" format=\"*x\" maxlength=\"30\"/>
";
echo "Password: <input type=\"password\" name=\"logpwd\" maxlength=\"30\"/>
";
echo "<anchor>";
echo "<go href=\"login.php\" method=\"post\">";
echo "<postfield name=\"loguid\" value=\"$(loguid)\"/>";
echo "<postfield name=\"logpwd\" value=\"$(logpwd)\"/>";
echo "</go> LOGIN
";
echo "</anchor>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
if(($action != "") && ($action!="terms"))
{
$uid = getuid_sid($sid);
if((islogged($sid)==false)||($uid==0))
{
echo "<card id=\"main\" title=\"© Chatheaven (ERROR!)\">";
echo "<p align=\"center\">";
echo "You are not logged in
";
echo "Or Your session has been expired
";
echo "<a href=\"index.php\">Login</a>
";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
//echo isbanned($uid);
if(isbanned($uid))
{
echo "<card id=\"main\" title=\"© Chatheaven (ERROR!)\">";
echo "<p align=\"center\">";
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>
";
echo "You are Banned
";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'"));
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "Time to finish your penalty: $rmsg
";
echo "Ban Reason: $banres[0]";
//echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");
?>
<?php
//////////////////////////////////gallery List
if($action=="gallery")
{
$who = $_GET["who"];
addonline(getuid_sid($sid),"Viewing Gallery","");
$uid = getuid_sid($sid);
//////ALL LISTS SCRIPT <<
echo "<card id=\"main\" title=\"© Chatheaven \">";
echo "<p align=\"center\">";
if($page=="" || $page<=0)$page=1;
if($who!="")
{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery WHERE uid='".$who."'"));
}else{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery"));
}
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
if($who!="")
{
$sql = "SELECT id, uid, file FROM gallery WHERE uid='".$who."' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, uid, file FROM gallery ORDER BY id DESC LIMIT $limit_start, $items_per_page";
}
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$user = getnick_uid($item[1]);
$ext = getext($item[2]);
$ime = getextimg($ext);
$lnk = "<img src=\"gallery.php?id=$item[0]\" alt=\"$user\"/>
<a href=\"../gallery/$item[2]\">$user</a>";
if(candelvl($uid, $item[0]))
{
$delnk = "<a href=\"genproc.php?action=delpic&sid=$sid&vid=$ite m[0]\">[x]</a>";
}else{
$delnk = "";
}
if($who!="")
{
$byusr="";
}else{
$unick = getnick_uid($item[3]);
$ulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$ite m[1]\">$unick</a>";
$byusr = "- By $ulnk";
}
echo "$lnk $delnk
";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"pics.php?action=$action&page=$ppage&sid=$si d&who=$who\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"pics.php?action=$action&page=$npage&sid=$si d&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor><go href=\"pics.php?action=$action&who=$who&sid=$sid\" method=\"get\">";
$rets .= "</go>GO!
";
$rets .= "</anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"upload.php?action=uploader&sid=$sid\">";
echo "Upload Gallery Pictures</a>
";
if($who!="")
{
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who \">";
$whonick = getnick_uid($who);
echo "$whonick's Profile</a>
";
}else{
echo "<a href=\"index.php?action=stats&sid=$sid\">";
echo "<img src=\"../images/stat.gif\" alt=\"*\"/>Site Stats</a>
";
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
echo "</wml>";
?></div>
all i did was change the headers .. add in the ?> <wml> <?php bit .. and hopefully converted the forms to wml ..
you should cautious with ANY forms that have the ENCTYPE=\"multipart/form-data\" bit in there .. that basically means that it allows files to be sumbitted and as far as i understand, you only need text with that form .. ?
anyways .. have fun with that code above .. i have no idea if it works but im fairly certain that the original code you posted wasnt valid so please check the pages using http://validator.w3.org/ !!
and if any of that doesnt work, feek free to drop me a msg or two and ill help push you in the right direction =]
oh, and if you didnt already know, for long scripts such as this one, please use the [codebox]...[/codebox] tags instead of [code]...[/code]
thanks!
try http://www.w3schools.com/wap .. dunno how you couldnt find that CORRECT url on google ... please ensure your so called 'facts' are correct before you patronise ..http://3schools.com/wap dunno how you couldn't find that on google[/b]
thank you.
--Kwah
Comment
-
hey kwah bro that is soo cool u r one of the best ppl i had ever come accrossed thank you soo much for this brother in future if u r in any need and if i can help then do ask me brother ill without hesitatin help u. even amylee is a sweet girl to give me tips on wmlFailure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
it didn work bro there is some error with
echo "<head>";
echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
<meta name=\"description\" content=\"Chatheaven \">
<meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\"></head>";
page dont show
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
someone plz do it for me
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
i could not amylee i tried alot
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
Guest
look.. you really should go learn programming ..it didn work bro there is some error with
echo "<head>";
echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
<meta name=\"description\" content=\"Chatheaven \">
<meta name=\"keywords\" content=\"free, community, forums, chat, wap, communicate\"></head>";
page dont show
[/b]
if it is only that bit which is causing problems, then either take it out or fix it ...Code:http://www.w3schools.com/wap/ [url]http://www.w3schools.com/php/[/url] [url]http://www.w3schools.com/xhtml/[/url]
a little bit of homework:
try taking a look at the '/' at the end of the meta tags and find out whether it should or shouldnt be there ..
Comment
Comment