- Home
- Categorie
- Coding e Sistemistica
- PHP
- Problema visualizza codice
-
Problema visualizza codice
Ciao a tutti.. come mai che quando vado, con opera mini, nella pagina index della mia chat.. mi visualizza:
XML parsing failed: syntax error (Line:9, Character:34)
Reparse document as HTML
e il codice con tutti gli ancoraggi? Se clicco.. Reparse document as HTML riesco ad accedere. E questo lo fa pure in altre pagine della chat. Mi potete aiutare?
-
Scusa ma con queste informazioni che ci hai dato come vuoi essere aiutato?
e il php che centra?
-
la chat e questa universal3000.altervista.org/chat_universal/index.php(non voglio fare spam)
Se ci vai con opera dovrebbe spuntarti quello che ho appena scritto.. almeno a me fa cosi.
-
Io non riesco nemmeno ad entrarci con firefox veramente... mi fa scaricare il file...
magari posta il codice...
-
ok 1 attimo
[php]<?php
header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
$New_Time = time() + (0 * 60 * 60);
$time=date("H:i",$New_Time);
$tie = fopen('text/chatpaikalla.txt', 'r+');
$jui=file('text/chatpaikalla.txt');
$ko=file_get_contents ('text/chatpaikalla.txt');
for ($i=0; $i<count($jui); $i++)
{
$hee=$jui*;
$alo=explode("",$jui*);
$erotus=time()-$alo[1];
if ($erotus>=120){$ko = str_replace ($hee,'',$ko);}
}
ftruncate($tie,0);
fputs($tie, $ko);
fclose($tie);
$chatpaik=file('text/chatpaikalla.txt');
$paikk=file('text/paikalla.txt');
$salnim=file('text/nims.txt');
$user = explode ('/', $HTTP_USER_AGENT);
echo "<?xml version="1.0" encoding="ISO-8859-1" ?>\n";
echo "<wml>\n";
echo "<head>";
echo "<meta name="keywords" content="wap, wapchat, chat, mobile chatroom, script, wap script"/>";
echo "<meta name="description" content="wapchat version 2.0.0 (wml 1.1 EN)"/>";
echo "<meta name="robots" content="index, follow"/>";
echo "<meta name="revisit-after" content="1 days"/>";
echo "<meta name="rating" content="general"/>";
echo "<meta name="author" content="deviance, ghost"/>";
echo "<meta http-equiv="Cache-Control" content="no-cache"/>";
echo "</head>";
//put your site name here!
echo "<card newcontext="true" title="UNIVERSAL 3000">\n";
echo "<p align="center">\n";
echo "<small>";
echo "".date("D d M y - ")."\n";
echo "<a href="main/time2.php">".date("H:i")."</a>";
echo "<br/>";
//also put your site name here!
echo "<img src="universal3000.altervista.org/UNIVERSALfirmato.JPG" alt="by UNIVERSAL 3000"/><br/>\n";
$fp=fopen("text/count.txt","a+"); fputs($fp,"1"); fclose($fp);
echo "Benvenuti nella<br/>CHAT UNIVERSAL</a><br/>\n";
echo "<img src="universal3000.altervista.org/s8_468_.gif" alt="chat universal"/><br/>\n";
echo "<a href="main/sisaan.php">Login</a><br/>\n";
echo "<a href="main/registerrules.php">Register</a><br/>\n";
echo "<a
href="my.wapshare.us/gb.php?id=3025#card1 ">GUESTBOOK3000</a>\n";
echo "<br/>\n";
$owners=count(file('text/ownernames.txt'));
$admins=count(file('text/adminnames.txt'));
$mods=count(file('text/modnames.txt'));
$banned=count(file('text/bannames.txt'));
$staff = $owners + $admins + $mods;
echo "Utenti Online:";
echo " ";
echo "<a href="main/online.php">".count(file('text/chatpaikalla.txt'))."</a><br/>\n";
echo "Chat Staff:";
echo " ";
echo "<a href="main/staff.php">".$staff."</a><br/>\n";
echo "Lista Utenti:";
echo " ";
echo "<a href="main/users.php">".count(file('text/nims.txt'))."</a><br/>\n";
echo "Smileys:";
echo " ";
echo "<a href="main/chatsmileys.php">".count(file('text/smileys.txt'))."</a><br/>\n";
echo "Utenti Bannati:";
echo " ";
echo "<a href="main/bannedusers.php">".$banned."</a><br/>\n";
echo "Chat Statistiche:";
echo " ";
echo "<a href="main/stats.php">*</a>\n";
echo "<br/>---<br/>";
$time=number_format(microtime(),2);
echo "Script: $time Sec(s)";
echo "<br/>Valid>WML 1.1</a>";
echo "<br/>---<br/></a>powered by UNIVERSAL 3000 </small>";
echo "<br/>---<br/>";[/php]
Mentre che ci sono ti dico un altro problema.. quando sei in chat e vai nei privati, o in posta..quando torni la pagina non è aggiornata, cioè prima di tornare devi fare svuota cache, la stessa cosa pure nei privati per rispondere ad ogni messaggio devi fare svuota cache. quale codice occorre, quello della chat o quello dei privati? Questo è quello della chat
[php]$nimi = $_REQUEST['nimi'];
$salasana = $_REQUEST['salasana'];
$swe_from = array("","","","","","","$","&","");
$swe_to = array("", "", "", "", "", "","[usd]","[and]","");for ($t=0; $t<count($swe_from); $t++)
{
$nimi = str_replace ($swe_from, $swe_to, $nimi);
$salasana = str_replace ($swe_from, $swe_to, $salasana);
$viesti = str_replace ($swe_from, $swe_to, $viesti);
}$salasana=crypt($salasana,'password');
$salnim=file('../text/nims.txt');
$salsan=file('../text/sals.txt');
for ($i=0; $i<count($salnim); $i++)
{ if (rtrim($salsan*)==$salasana && rtrim($salnim*)==$nimi){$a="1";}}
if ($a !="1"){
echo "<wml>";
echo "<card title="Chat">";
echo "<p align="center">";
echo "<small>System:<br/>---<br/><b>*</b>You are NOT logged in! please hit the login button if this matter persist please email one of the staff and we will try to sort the problem asap thanx :-)<br/>";
echo "<a href="../index.php">« Login page</a>";
echo "<br/>---<br/></a>powered by UNIVERSAL 3000 </small>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$aikanyt=time();
$aika=file('../text/ajat.txt');
$ero=$aikanyt-$aika[0];
if ($ero>=120){
$peke = fopen('../text/chatpaikalla.txt', 'r+');
ftruncate ($peke,0);
fclose($peke);
}
$tiedo = fopen('../text/ajat.txt', 'r+');
ftruncate ($tiedo,0);
$tos=$aikanyt;
fputs($tiedo, $tos);
fclose($tiedo);$sama=0;
$paikalla=file('../text/paikalla.txt');
for ($u=0; $u<count($paikalla); $u++)
{
if (rtrim($paikalla*)==$nimi)
{$sama="1";$u=count($paikalla)+1;}
}
if ($nimi != "hiddenname" && $sama != "1")
{
$tie = fopen('../text/paikalla.txt', 'r+');
$ko=file_get_contents ('../text/paikalla.txt');
$to=$nimi .'
'. $ko;
fputs($tie, $to);
fclose($tie);
}
$lis=0;$katsos=0;$tyhja='';
$jepulio=file('../text/paikalla.txt');
$privaviestit=file('../text/leli.txt');
$salasana=crypt($salasana,'password');
$chatpaik=file('../text/chatpaikalla.txt');
$sama=0;
for ($u=0; $u<count($chatpaik); $u++)
{
$alio=explode("",$chatpaik*);
if (rtrim($alio[0])==$nimi)
{$sama="1";$u=count($chatpaik)+1;}
}
if ($nimi != "hiddenname" && $sama != "1") {
$tie = fopen('../text/chatpaikalla.txt', 'r+');
$ko=file_get_contents ('../text/chatpaikalla.txt');
$to=$nimi .''.time().'
'. $ko;
fputs($tie, $to);
fclose($tie);
}
if ($sama=="1"){
$tie = fopen('../text/chatpaikalla.txt', 'r+');
$jui=file('../text/chatpaikalla.txt');
$ko=file_get_contents ('../text/chatpaikalla.txt');
for ($i=0; $i<count($jui); $i++)
{
$alo=explode("",$jui*);
if ($nimi==$alo[0]){$hee=$jui*;}
}
$ko = str_replace ($hee,$nimi.''.time().'
', $ko);
fputs($tie, $ko);
fclose($tie);
}
$tie = fopen('../text/chatpaikalla.txt', 'r+');
$jui=file('../text/chatpaikalla.txt');
$ko=file_get_contents ('../text/chatpaikalla.txt');
for ($i=0; $i<count($jui); $i++)
{
$hee=$jui*;
$alo=explode("",$jui*);
$erotus=time()-$alo[1];
if ($erotus>=120){$ko = str_replace ($hee,'',$ko);}
}
ftruncate($tie,0);fputs($tie, $ko);
fclose($tie);include("modtools.php");
include ("admintools.php");
include ("ownertools.php");$salsan=file('../text/sals.txt');
$salnim=file('../text/nims.txt');
echo "<wml>";
echo "<head>";
echo "<meta http-equiv="Cache-Control" content="max-age=0"/>";
echo "</head>";
$New_Time = time() + (0 * 60 * 60);
$time=date("H:i",$New_Time);
$chatpaik=file('../text/chatpaikalla.txt');
echo "<card title="CHAT UNIVERSAL $time - (";echo count($chatpaik);echo ")";echo "" ontimer="chat.php?time=";
echo date('dmHis');
echo '&nimi=$nimi&salasana=$salasana';
echo "">";
echo "<timer value="200"/>";
echo "<p align="left">";
for ($i=0; $i<count($salnim); $i++)
{ if (rtrim($salsan*)==$salasana && rtrim($salnim*)==$nimi){$a="1";}}
for ($q=0; $q<count($privaviestit); $q++)
{
$tech=explode('',$privaviestit[$q]);
$testos=str_replace("", "",$tech[0]);
if ($testos==$nimi)
{
if ( strpos($privaviestit[$q],"")===0)
{
$katsos=$katsos+1;
}
$lis=$lis+1;
if ($lis>7)
{
$q=count($privaviestit)+1;
}
}
}
echo "<small>".date("D d M y - ")."\n";
echo "<a href="time.php">".date("H:i")."</a>";
echo "<br/>";echo "[1]<anchor>Scrivi";
echo "<go method="post" href="kirj.php?time=".time()."">";
echo "<postfield name="nimi" value="$(nimi)"/>";
echo "<postfield name="salasana" value="$(salasana)"/>";
echo "<setvar name="viesti" value=""/>";
echo "<setvar name="joo" value="h000"/>";
echo "</go>";
echo "</anchor>";
echo "<br/> ";
echo "[2]<anchor>Inbox";
if ($katsos>=1){
echo "(".$katsos.")";}
echo "<go method="post" href="prividis.php">";
echo "<postfield name="salasana" value="$(salasana)"/>";
echo "<postfield name="nimi" value="$(nimi)"/>";
echo "</go>";
echo "</anchor>";
echo "<br/> ";
echo "[3]<anchor>Privato";
echo "<go method="post" href="privkirj.php?viesti=">";
echo "<postfield name="nimi" value="$(nimi)"/>";
echo "<postfield name="salasana" value="$(salasana)"/>";
echo "<postfield name="kenelle" value="$(kenelle)"/>";
echo "<setvar name="viesti" value=""/>";
echo "</go>";
echo "</anchor>";
echo "<br/> ";
echo "[4]<anchor>Aggiorna";
echo "<go method="post" href="chat.php">";
echo "<postfield name="salasana" value="$(salasana)"/>";
echo "<postfield name="nimi" value="$(nimi)"/>";
echo "</go>";
echo "</anchor><br/>\n";
if ($katsos>=1){
echo "<anchor>*";
echo "<go method="post" href="prividis.php">";
echo "<postfield name="salasana" value="$(salasana)"/>";
echo "<postfield name="nimi" value="$(nimi)"/>";
echo "</go>";
echo "</anchor>";
echo "(".$katsos.")New Message(s)<br/>---<br/>";}
echo "</small>";
echo "</p>";
echo "<p>";if ($a != "1") { $ines=0; $viesti="";}
if ($viesti != ''){
$turska=file('../text/toisto.txt');
for ($l=0; $l<count($turska); $l++)
{ if (rtrim($turska)==$viesti){$viesti='';}}
$toistoke = fopen('../text/braccio.txt', 'r+');
$hypro=file_get_contents ('../text/textt.txt');
$hape=$viesti . '
' . $hypro;
fputs($toistoke, $hape);
if (filesize('../text/text.txt')>400)
{ftruncate ($toistoke,400);}
fclose($toistoke);
}
if ($joo=='h000'){$joo='';}
$viesti=$viesti.$joo;
if ($viesti != '') {
$swe_from = array("","","","","","","$","&","");
$swe_to = array("", "", "", "", "", "","[usd]","[and]","");
for ($i=0; $i<count($swe_from); $i++)
{
$viesti = str_replace ($swe_from*, $swe_to*, $viesti);
$nimi = str_replace ($swe_from*, $swe_to*, $nimi);
}
$rumatsanat=file('../text/sensuuri.txt');
for ($ri=0; $ri<count($rumatsanat); $ri++)
{
$vaihto=rtrim($rumatsanat[$ri]);
$viesti = str_replace ($vaihto,"****", $viesti);
}$nimi= htmlspecialchars($nimi);
$nimi= stripslashes($nimi);
$viesti= htmlspecialchars($viesti);
$viesti=stripslashes($viesti);
include("bbcodes.php");include("../main/smileyarray.php");
$kuv=file('../text/smileywml.txt');
for ($m=0; $m<count($joo); $m++)
{
$viesti = str_replace ($joo[$m], rtrim($kuv[$m]), $viesti);
}
$joo='';$user = explode ('/',$_SERVER['HTTP_USER_AGENT']);
$ip = $_SERVER['$REMOTE_ADDR'];
if($admin=="1"){$uusirivi ='<small>'.$time.'<a href="pmuser.php?kenelle='.$nimi.'&nimi=$nimi&salasana=$salasana&rank=1&phone='.$user[0].'&ip='.$ip.'">'.strip_tags($nimi) . '</a>:<br/> ' . $viesti . '</small><br/>
';}
if($admin=="2"){$uusirivi ='<small>'.$time.'<a href="pmuser.php?kenelle='.$nimi.'&nimi=$nimi&salasana=$salasana&rank=2&phone='.$user[0].'&ip='.$ip.'">¹'.strip_tags($nimi) . '</a>:<br/> ' . $viesti . '</small><br/>
';}
if($admin=="3"){$uusirivi ='<small>'.$time.'<a href="pmuser.php?kenelle='.$nimi.'&nimi=$nimi&salasana=$salasana&rank=3&phone='.$user[0].'&ip='.$ip.'">²'.strip_tags($nimi) . '</a>:<br/> ' . $viesti . '</small><br/>
';}
if($admin=="4"){$uusirivi ='<small><a href="pmuser.php?kenelle='.$nimi.'&nimi=$nimi&salasana=$salasana&rank=4&phone='.$user[0].'&ip='.$ip.'">'.strip_tags($nimi) . '</a> '.$time.'» madoo che brutta figura che sto facendo..sono testa di minkia, voglio dimostrare qualcosa ma so fatto cosi</small><br/>
';}
if($admin=="7"){$uusirivi ='
';}
if($admin=="0"){$uusirivi ='<small>'.$time.'<a href="pmuser.php?kenelle='.$nimi.'&nimi=$nimi&salasana=$salasana&rank=0&phone='.$user[0].'&ip='.$ip.'">'.strip_tags($nimi) . '</a>:<br/> ' . $viesti . '</small><br/>
';}
$tiedosto = fopen('../text/mano.txt', 'r+');
$kolmas=file_get_contents ('../text/mano.txt');
$toinen="$uusirivi $kolmas";
fputs($tiedosto, $toinen);
if (filesize('../text/mano.txt')>1000000)
{ftruncate ($tiedosto,1000000);}
fclose($tiedosto);
$viestik=$viesti;
$nimik=$nimi;
$viesti = '';
}
$juttujoo=file('../text/mano.txt');
for ($k=0; $k<17; $k++)
{
echo $juttujoo[$k];
}echo "</p>";
echo "<p align="center">";
echo "<small>";
if($admin=="1"){echo "<a href="ownercp.php?nimi=$nimi&rank=1">CPanel</a>";}
if($admin=="2"){echo "<a href="admincp.php?nimi=$nimi&rank=2">¹CPanel</a>";}
if($admin=="3"){echo "<a href="modcp.php?nimi=$nimi&rank=3">²CPanel</a>";}
echo "<br/>";[/php]
E poi in questa stringa..
if($admin=="7"){$uusirivi ='
';}
dovrebbe esserci i comandi dell'owner, che mancano.. ma puoi dire come impostarli? grazie in anticipo.