Flatbase Shoutbox Exilent :d

Started on the old forum in April 2007 · view the original in the archive · old links redirect here

5 replies · 796 views · started 19 years ago · 2 min read

Guest #1

Here is a easy to use flatbase script u can use for any script on wml ...its easy to install and doesnt need a sql database for it..its mostly great for users that starts new chats...enjoy External image (may be gone)

u can paste this anywhere in any script its the main for the shout box ,,,u can past it in the front page of your index.php or in the inside of your chatroom External image (may be gone)

CODE//////////////////////////////////////////// // shoutbox by cyberspider // //////////////////////////////////////////// echo "--------------- "; echo "<img src="shoutlogo.gif" alt=""/> "; echo "The shout box "; $shoutboxfile=file('shoutbox.txt'); for ($x=0; $x<1; $x++) { $shoutboxfile[$x] = rtrim($shoutboxfile[$x]); if (substr(trim($shoutboxfile[$x]),0,External image (may be gone) != "DELETED_"){ echo "$shoutboxfile[$x]"; }} echo ""; echo "<anchor>Shout"; echo "<go method="post" href="shoutbox_1.php">"; echo "<postfield name="shout" value="$(shout)"/>"; echo "<setvar name="shout" value=""/>"; echo "</go>"; echo "</anchor>"; echo ""; echo " - "; echo "<anchor>Read"; echo "<go method="post" href="shoutbox_3.php">"; echo "</go>"; echo "</anchor>"; echo "

"; ////////////////////////////////////////////

the following is the shoutbox_1.php file that need to be inserted and dont forget to change the index.php inside to where your shoutbox is:DCODE<?php header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; echo ""; echo "<wml>"; echo "<card title="Send a shout">"; echo " "; echo "SEND A PUBLIC "; echo "SHOUT "; echo "--------------- "; echo "Do not use abusive "; echo "or vulgar text in "; echo "the shoutbox. "; echo "--------------- "; echo "Your text "; echo "<input type="text" name="shout" value="" emptyok="true" maxlength="200"/> "; echo ""; echo "<anchor>Send your shout"; echo "<go method="post" href="shoutbox_2.php">"; echo "<postfield name="nimi" value="$(nimi)"/>"; echo "<postfield name="salasana" value="$(salasana)"/>"; echo "<postfield name="shout" value="$(shout)"/>"; echo "</go>"; echo "</anchor> "; echo ""; echo "<anchor>Back to menu"; echo "<go method="post" href="index.php">"; echo "<postfield name="nimi" value="$(nimi)"/>"; echo "<postfield name="salasana" value="$(salasana)"/>"; echo "</go>"; echo "</anchor>"; echo ""; echo " "; echo "</card>"; echo "</wml>"; ?> !!!

the third part for this is the shoutbox_2.php that need to be loaded up!!

CODE<?php header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; echo ""; ///////////////////// // Filter swearing // ///////////////////// $rumatsanat=file('censored.txt'); $leeg = ""; for ($ri=0; $ri<count($rumatsanat); $ri++) { $vaihto=rtrim($rumatsanat[$ri]); $viesti = str_replace ($vaihto,"censored", $viesti); } //////////////////// echo "<wml>"; echo "<card title="Send a shout" ontimer="index.php?time="; echo date('dmHis'); echo '&nimi=$nimi&salasana=$salasana'; echo "">"; echo "<timer value="50"/>"; echo " "; if (filesize('shoutbox.txt')>30000) { $peke = fopen('shoutbox.txt', 'r+'); ftruncate ($peke,0); fclose($peke); } $swe_from=array("å","ä","ö","Å","Ä","Ã-","$","&","Â"); $swe_to=array("å", "ä", "ö", "Å", "Ä", "Ö","d","j",""); $shout=str_replace ($swe_from[$i], $swe_to[$i], $shout); $shout=htmlspecialchars($shout); $shout=stripslashes($shout); $uusirivi ='SHOUT : '.$shout.'

'; $tiedosto = fopen('shoutbox.txt', 'r+'); $kolmas=file_get_contents ('shoutbox.txt'); $toinen="$uusirivi $kolmas"; fputs($tiedosto, $toinen); fclose($tiedosto); echo "SEND A PUBLIC "; echo "SHOUT "; echo "--------------- "; echo "Your shout was send "; echo "--------------- "; echo "<anchor>Back to menu"; echo "<go method="post" href="index.php">"; echo "<postfield name="nimi" value="$(nimi)"/>"; echo "<postfield name="salasana" value="$(salasana)"/>"; echo "</go>"; echo "</anchor>"; echo ""; echo " "; echo "</card>"; echo "</wml>"; ?>

after u done this now u will need to upload the 3rd section of shoutbox_3.php

CODE<?php header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; echo ""; echo "<wml>"; echo "<card title="View shouts">"; echo " "; echo "View the shouts "; echo ""; echo "<anchor>Send a shout"; echo "<go method="post" href="shoutbox_1.php">"; echo "<postfield name="nimi" value="$(nimi)"/>"; echo "<postfield name="salasana" value="$(salasana)"/>"; echo "<postfield name="shout" value="$(shout)"/>"; echo "<setvar name="shout" value=""/>"; echo "</go>"; echo "</anchor> "; echo ""; echo "<anchor>Back to menu"; echo "<go method="post" href="index.php">"; echo "<postfield name="nimi" value="$(nimi)"/>"; echo "<postfield name="salasana" value="$(salasana)"/>"; echo "</go>"; echo "</anchor> "; echo "

"; $shoutfile=file('shoutbox.txt'); for ($x=0; $x<10; $x++) { $shoutfile[$x] = rtrim($shoutfile[$x]); if ($shoutfile[$x] != ''){ if (substr(trim($shoutfile[$x]),0,External image (may be gone) != "DELETED_"){ echo "$shoutfile[$x]"; }}} echo ""; echo " "; echo "</card>"; echo "</wml>"; ?>

now for last part of this script is to create a shoutbox.txt file chmod 777 and then u create a censored.txt file that looks like this!!!

CODEyou can type any word here u dont like ppl to say in the shoutbox example:

you me shit f88k create your own list as u wish and have fun..

i hope this will come handy for someone enjoy the rest of the day cya External image (may be gone)

abhisar #2

Create a zip file and upload.

alesh Lead · 604 posts #3

hmmm i couldnt get it work! cuz u have a smilie in the 1st script and when i put that file in my index it says error blabla in row 20.. .. and u have another smilie in sum file below! could u check it pls?

eeeeerrr....

Guest #4

hmmm i couldnt get it work! cuz u have a smilie in the 1st script and when i put that file in my index it says error blabla in row 20.. .. and u have another smilie in sum file below! could u check it pls?

oops lol my mistake haha il upload it lol smily buggered it up haha ok here it is:

please just remember to read the first part of this post and to make the files thats needed and change txt files to 777

enjoy External image (may be gone)

alesh Lead · 604 posts #5

The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


Invalid at the top level of the document. Error processing resource 'http://www.2wap.org/forums/index.php?act=attach&type=post&id=1049'. Line 5, Position 55

echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>"; ------------------------------------------------------^

LOOK WHT I GOT WHEN I WANNA DOWNLOAD THOSE FILES

I KNW IM JUST A BEGINER BUT I SERIOUSLY DOUBT ITS A SHOUTBOX LOLOLOLOL

//////////////////////////////////////////// // shoutbox by cyberspider // //////////////////////////////////////////// echo "--------------- "; echo " "; echo "The shout box "; $shoutboxfile=file('shoutbox.txt'); for ($x=0; $x<1; $x++) { $shoutboxfile[$x] = rtrim($shoutboxfile[$x]); if (substr(trim($shoutboxfile[$x]),0, != "DELETED_"){ echo "$shoutboxfile[$x]"; }} echo ""; echo "Shout"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo " - "; echo "Read"; echo ""; echo ""; echo ""; echo "

"; ////////////////////////////////////////////

eeeeerrr....

alesh Lead · 604 posts #6

okay now...is there sum1 so nice and tell me wht goes there where smilie stands? pls! i cnt download those atached files...

eeeeerrr....

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close