• User Attivo

    Sia da WAP che da WEB

    Ciao a tutti..ho una chat senza database fatta in php..visibile solo dai cellulari..come si può vedere pure da PC???


  • Super User

    Ciao 🙂

    Devi creare un'interfaccia anche per i browser dei pc, magari disponibile ad un indirizzo differente.


  • User Attivo

    Ciao Claudio , 🙂 come si crea un interfaccia? se puoi fare un esempio.


  • Super User

    Allora il php si occupa di gestire i messaggi inviati.

    Poi li presenta formattati in un certo modo.
    Per il wap con codice wml.

    Se tu vuoi presentarli per i pc devi usare l'html.

    Non posso farti esempi perchè non conosco il codice che utilizzi.

    Tuttavia credo sia abbastanza difficile realizzare il tutto un'idea di base di cosa si tratti.


  • User Attivo

    Qua c'è il codice index
    [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 "<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 "Oggi è: ".date("D d M y - ")."\n";
    echo "</small>";
    echo "<a href="main/time2.php">".date("H:i")."</a>";
    echo "<br/>";
    //also put your site name here!
    echo "<img src= alt="by UNIVERSAL 3000"/><br/>\n";
    $fp=fopen("text/count.txt","a+"); fputs($fp,"1"); fclose($fp);
    $xfile = @file("random.txt");
    $random_num = rand (0,count($xfile)-1);
    $udata = explode("::",$xfile[$random_num]);
    echo "$udata[1]<br/>---<br/>";
    echo "Benvenuti nella<br/>CHAT UNIVERSAL<br/>\n";
    echo "<img src=" 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="";
    echo "<a
    href="htt">";
    $xfile = @file("random1.txt");
    $random_num = rand (0,count($xfile)-1);
    $udata = explode("::",$xfile[$random_num]);
    echo "$udata[1]";
    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";
    echo "<br/>---<br/>©powered by UNIVERSAL 3000 ";
    echo "<br/>---<br/>";
    echo "<a
    href="";
    echo "<br/>\n";
    echo "<a
    href=\alla Home</a>\n";
    echo "<br/>\n";
    echo "VISITE TOTALI:";
    $fp=fopen("count.txt","a+"); fputs($fp,"1"); fclose($fp);
    $fp1=filesize("count.txt");
    echo "$fp1";
    echo "<br/>";
    echo "</p>\n";
    echo "</card>\n";
    echo "</wml>\n";
    ?>[/PHP]