lailai
Apr 7 2008, 09:38 AM
With this tutorial, you will learn how to create a simple shoutbox, but only uses a .txt file. Also with auto refresh, and I am going to do a backgound. We will be making 5 files. 1. index.php The main page2. msg.php Reading msg.txt3. msg.txt Note: You must give it 7774. shout.php Where it add to msg.txt5. bg.gif Background.Index.php would be like this: CODE <html> <head> <title>Shoutbox</title> </head> <body> <iframe src="msg.php" marginwidth="1" marginheight="0" height="200"width="153" border="0" frameborder="0"></iframe> <FORM name="shout" action="shout.php" method="POST"> Name:<br> <INPUT TYPE="TEXT" name="name" size="20"><br> Message:<br> <INPUT TYPE="TEXT" name="message" size="20"><br> <br> <INPUT TYPE="Submit" name="submit" value="Shout!" size="20"> </FORM> </body> </html> Let's go over what the code do. <html> -> <body> are just the title. <iframe> gets msg.php which gets msg.txt. You will know why I do that later. <FORM> -> </FORM> is where you can type what you want to shout. Now let's make the msg.php! CODE <html> <head> <meta http-equiv="refresh" content="8;url=msg.php" /> </head> <body> <?php include('msg.txt'); ?> </body> </html> I shouldn't really explan this. Meta refresh the page every 8 sec. <?php include gets msg.txt. I did this was for it won't refresh the whole page, as if it refresh while typing it will rub out the msg. Just make a msg.txt with 777. And for shout.php: CODE <?php
$name = $_POST['name']; $message = $_POST['message'];
$code = array( '/:\)/', '/:P/', '/:D/' //Bla bla bla );
$image = array( '<img src="smileys/1.gif">', '<img src="smileys/2.gif">', '<img src="smileys/3.gif">' // Bla bla bla ); $formatted = preg_replace($code, $image, $message);
$tag = ("<font size=\"2\" face=\"Arial\"><b> $name:</b>$message </font><br>");
$read = fopen("content.txt", "r"); $contents = fread($read, filesize('content.txt')); fclose($read); $write = fopen("content.txt", "w"); fwrite($write, "$tag $contents"); fclose($write);
print "<meta http-equiv=\"refresh\" content=\"0;index.php\">";
?> I made a little smiley feature, and you can use it for bb codes like [heading] turns to <h2> and stuff. Hope you enjoyed the tut!
Reply
datanizze
Jun 8 2008, 08:14 PM
OMFG, this was so helful, Even without any PHP-programming skills, I managed to add some new smilieys and get it to work according to my wishes  , very easy-to-understand tutorial with fast result. only problem I had was that there was no space between two posts. however, I managed to fix this, but it was not in any of these files frome this tutorial, i got to change css-files, create new css-files and edit some other HTML-code. Once again, GREAT tutorial! you made my understanding for PHP bigger now too.... but there is ONE thing. how do I make a check so that the user did type in a message, so i don't get empty messages (SPAM)??
Reply
StaticIp
Jun 17 2008, 03:59 AM
My browser tries to save the .php file every time I press shout
Reply
nitish
Jun 21 2008, 07:38 AM
QUOTE(StaticIp @ Jun 17 2008, 09:29 AM)  My browser tries to save the .php file every time I press shout You are probably running it from your computer without php installed. You can download software like Easy PHP, WAMP. Just search them on google. Then copy those files to something like www or htdocs in the installation folder and run the server.
Reply
minimcmonkey
Jun 25 2008, 09:44 PM
Nice tutorial, havent used it yet, but i must! as i havent done any PHP for a long time, and intend to do some more before i start creating my new website! Nice thread!
Reply
Forbez
Jun 25 2008, 10:43 PM
Nice and simple, I love it. You really put a lot of care into this tutorial. Well done mate. I may be using this myself sometime. Perhaps you could post some suggested different CSS styles for this.
Reply
lailai
Jul 21 2008, 09:46 AM
Thanks guys. Some guy has stole my tut, so I need to get that fixed before posting more tuts here.
Reply
Recent Queries:--
shoutbox with free autorefresh - 12.30 hr back. (1)
-
shoutbox refresh animated - 25.79 hr back. (1)
-
auto refresh php mysql - 66.15 hr back. (1)
-
make a simple ajax sample shoutbox - 79.21 hr back. (1)
-
make your own shoutbox - 79.96 hr back. (3)
-
how to auto refresh an img control image - 109.92 hr back. (1)
-
php time statistics refresh - 128.71 hr back. (1)
-
auto refresh content code body code - 147.92 hr back. (1)
-
auto-refresh shoutbox - 148.43 hr back. (1)
-
automatic refresh shoutbox - 152.11 hr back. (1)
-
how to make a shout box - 152.31 hr back. (3)
-
refresh shoutbox - 164.25 hr back. (1)
Similar Topics
Keywords : make, flat, based, shoutbox, auto, refresh,
- Simple Shoutbox In Php
(2)
Background Image Swap Script
Change a Background Image based on clock time (15) Background Image Changer Script To swap the background image from your CSS file according to the
Server Clock Time. 1.) In your CSS file, add the following rule: CODE body {
background: url(time.png); } 2.) Create a "folder" named time.png. 3.) Into the
folder, place three images named morning.png, day.png, night.png. 4.) Also, in the same folder,
create an index.php file and copy/paste the following script. CODE <?php $hour =
date('H'); if ($hour < 12 ) { $image =
"morning.png"; } ....
Faux Ajax Loading - Css Only
Pretend your site is Ajax based (3) Link: http://www.jlhaslip.trap17.com/samples/misc/ajax/index.html Check that out. The first page
has information and the second and has the actual example of its use with sample CSS code. I find
that when you visit a site which has a slow server and attempt to view 'large' Image files,
it is pretty boring to sit and stare at a blank screen, so this little snippet of code can be used
to give the visitor something to see to indicate that the image is being downloaded. I built a
small animated gif that sits in the background of the space allocated for the image....
Making a java based program
(3) Java GUI Making a Little Java Program Sec. 1: Imports and starting it off Sec. 2: Variables Sec.
3: Frame and Stuff Sec. 4: Declaring buttons Sec. 5: Adding buttons Sec. 6: Action Listening Sec. 7:
Using this for a learning experience Section 1 Now, let's think. What imports do we need? We
obviously need GUI imports. We also need the action Listener. So, let's declare this at the very
top: Code: CODE import java.awt.*; import java.awt.event.*; import javax.swing.*; That's
all we need to get all our supplies. Now to start us off. Skip a couple lines ....
Css-based "i-frames" (sort Of)
A couple of ways to do it... (1) I got thinking that it might be nice to have a method to load a bunch of pictures up to a site, but
not have them taking up a lot of space. And without using a bunch of php, while still presenting the
entire picture. And using full-on CSS coding, not tables or frames. So here you go... a "picture in
a picture" method. A CSS framed picture And a "hidden" "picture in a picture" method. A
"hidden" CSS framed picture Sort of a way to 'hide the picture and let the user decide if they
want to actually see the image. All it does is use positioning for placing the....
Simple Shoutbox
PHP, MySQL driven.. (34) Ok, so I'm going to show you how to create a very basic shoutbox which is driven with PHP and a
MySQL database. So, lets start - open a database management program like PHPMyAdmin and run these
queries. SQL CREATE TABLE `shoutbox` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT
, `name` VARCHAR( 255 ) NOT NULL , `mail` VARCHAR( 255 ) NOT NULL , `time`
VARCHAR( 255 ) NOT NULL , `message` TEXT NOT NULL , `ip` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `id` ) ) TYPE = MYISAM ; CREATE TABLE `shoutbox_a....
How To Make A Simple File Based Shoutbox Using Php And Html
(8) A simple tut to make a simple shoutbox. Let me jump right in. First of all you need the standard
equipment for PHP, an IDE like XAMPP and an editor like PHP EDITOR 2OO7. Were going to make a
simple guestbook using three files, webpage.php, shout.php and shout.txt. Webpage.php can be
changed to whatver you want, it will be the page on which the guestbok is shown, you could even use
this code and add it to another php page n your site. Shout.php is the proccessing page and
shout.txt is where the shouts are stored. Firstly we need to make the visual design of the box.....
Features That You Can Use In The Shoutbox
(5) Some people dont know all of the features that the shoutbox has so im going to write about it
explaining it. Viewing Statistics In D21-Shoutbox 1.2 I have seen a few shouts in
the shoutbox asking how to view the Statistics for the Shoutbox, and it is quite simple actually.
First you need to click on "View The Shoutbox" which is located on the top bar of the Shoutbox,
it is located right next to "Latest Shouts In The Shoutbox" Once you are there, look in the
Trap17 Shoutbox section for My Control Panel Then it should be self ex....
Beginner's Guide To Skiing
Based on my own experience. (4) I really like skiing. It is so much fun that you won't know how you could have survived until
your first time. So here are some things you should know before you head over to your lcoal ski
area: Dressing: You should get a few basic things: -Base layer: long underwear, especially
thermals, keep you warm, wick moisture from the skin, keep your legs from getting irritated by your
ski pants -Middle layer: A fleece jacket; or anything aside from wool, which is very itchy. This
will keep you warm in cold weather. If your outer jacket or parka (see below) is insulate....
Css Based Photo Gallery Code
Fluid design for layout (3) Fluid Design Photo Gallery There are quite a few Topics here on the Trap17 Forum about how to
set-up and use Photo Galleries and about the link code for getting from a Thumbnail Image to a full
size Image and all that stuff, so I would like to take this "Photo Gallery" concept one step further
without covering what others have already supplied instruction for. Usually, when there is a
solution posted here for the code on "how-to-do-this", there are tables involved and the Links are
placed inside Table cells. Tables are not neccesarilly a bad thing, but they were n....
Php Navigation
How to make your navigation based on php (7) I have re-constructed my last PHP Navigation system and it works great. So I have it here for you
guys. Here are the instructions. INSTRUCTIONS: Open your main page for your site in your text
editor and paste in the following code where the main content goes. CODE <?php
error_reporting (E_ALL ^ E_NOTICE); if(!$page){ $page =
$HTTP_GET_VARS['page']; } //You can change 'page' to whatever you want.
//Default Page if($page == "" or $page == "index"){
include("main....
How To Change The Oil In Your Auto
(10) Now, I know that many people don't know how to change their own oil, and most cars are slightly
different. So, I'll try to explain this the best I can. The first thing you need to do is to
check your owners manual for what type of oil to use, and how much. You should usually buy one more
quart than you need, to help flush the old oil out. Step 1: Jack up the engine end of your car, so
you can easily get under the engine. Make sure that the car is secure before going under it. Step
2: Next, you will be looking for the oil plug. It is under the engine, usually u....
Tutorial: Installing D-shoutbox For Ipb V1.2
Making your installation even easier (12) Over the course of the summer I have tried hard to install a shoutbox into a new forum I was
developing. I went to the Invisionalize forums and found several mods for shoutboxes, but none of
them seemed to work. I first tried to install the D-Shoutbox, but upon this first try, I was
unsuccessful. Eventually, after much frustration, and trying other mods, which didn't seem to
stack up to Dean's features, I was determined to make it work. For some, editing your files (to
the newbie that is) can be difficult, with everything looking like a foreign language (basi....
How To Setup A Php-nuke Based Site
very helpfull (5) Ok, so you want to have a php nuke site. First of all, what is this "PHP nuke", and why is it so
special? Php nuke is a web portal system. It is expandible, and can be very usefull. You can find
an example here. Yes, it is that good. So, lets take a closer look. It's pre-packaged basic
features are: *forums *a login system *weblinks *downloads *news *polls *faqs *content You can
allways de-actuvate some features, but it's near-imposible to remove them. Kinda annoying, but
you know. Some people may not need phpnuke, or cant have i period. You need: *some ....
Shoutbox, Made Easy!
kShoutBox 0.3 ... now more powerful! (2) kShoutBox 0.3 QUOTE(readme.txt) Readme file to kShoutBox 0.3 To use the internet explorer
fix: Extract the ie7 folder to the root directory of your web server. Example, if you are using a
unix/linux server, it's on "public_html/" or "home/public_html" Then, extract the kShoutBox.php
file in to the root directory of your web server also. After that, open kShoutBox.php using your
Editor, then modify the MySQL Database username, and password. (if you are using cPanel, make sure
that you create a database manually, then enter the database name on hte kShout....
Shoutbox, Made Easy! Again!
with another version! (2) kShoutBox 0.2 has been released! For more information, go to http://www.karlo.ph.tc
/* ****************************** kShoutBox 0.2 ****************************** */
/* **************************************** This ShoutBox script was created by Juan Karlo Aquino
de Guzman DO NOT MODIFY THIS CODE AND DISTRIBUTING IT WITHOUT ANY PERMISSION. E-MAIL THE AUTHOR
FIRST. Email: 01karlo@gmail.com DO NOT REMOVE THE "POWERED BY". FOR SUGGESTIONS, COMMENTS, ETC,
SEND AN EMAIL TO 01karlo@gmail.com HOPE THAT YOU ENJOY THIS SCRIPT! MY FRIEN....
Shoutbox, Made Easy
PHP+MySQL ShoutBox! Very simple... (17) Just create a PHP file named "kShoutBox.php" CODE <?php header("Content-type:
text/html; charset=utf-8"); //Send to browser that the charset is utf-8 ?> <?php
/* ****************************** kShoutBox 0.1 ****************************** */
/* **************************************** This ShoutBox script was created by Juan Karlo Aquino
de Guzman DO NOT MODIFY THIS CODE AND DISTRIBUTING IT WITHOUT ANY PERMISSION. E-MAIL THE AUTHOR
FIRST. Email: 01karlo@gmail.com DO NOT REMOVE THE "POWERED BY". FOR SUGG....
Looking for make, flat, based, shoutbox, auto, refresh,
|
|
Searching Video's for make, flat, based, shoutbox, auto, refresh,
|
advertisement
|
|