(3/7/2008)
For you web developers... Ever wanted to run your own chat room from your site? Well, now you can, as many as you like, on as many pages of your site as you like! This really is a truly dynamic chat plugin for your website! Oh yes, and it's free of course...
So click here to check out the new GutterStar.net Dynamic Live Chat Plugin!
Our RSS News Feed Service has been updated to V3.1, which now supports Secure HTTP Authentication for public use! This really is awesome,
so click here to read more!
To find additional resources, enter the search terms: "chat script"
Change Log
V2.2: Fixed: Corrected the message file include statement to check whether the file exists in advance, which causes problems when using PHP5 if absent.
V2.1: Added: The option to reverse the chronological display order above or beneath the input form.
V2.0: Added: Introduced full accessibility support for the visually impaired using the JAWS For Windows screen reader.
Introduction
Make any page a chat room! It really is that easy...
How would you like to run a live chat room on your website? Well, now you can, on any page, using our Dynamic Live Chat Plugin!
What does this mean? Well, it means that anyone in the world who is looking at your web page will see new messages dynamically and automatically appear on the page as your visitors chat back and forth!
It really is that simple... Just check out the following section to try it out yourself...
What's this?
Well, it's quite simple really. After opening the Chat Section, type the message that you want to send. Then, guess what? That new message will automatically appear to everyone who is looking at the page, anywhere in the world! This is a great way to chat with your friends while pretending to do reall stuff like homework, or pretending to type happily away on that last report for your boss...
Very simply... The Dynamic Live Chat Plugin consists of a combination of PHP and JavaScript. The chat script does not require any XML queries to operate correctly, nor does it require the use of a database. Although the script simulates AJAX behavior, PHP is the only server-side language being utilized.
To maximize performance, dynamic variables are used within a flat text file to store messages as they arrive, only storing and displaying the number of messages that you specify within the msgConfig.php file. (The example above, for instance, is set to 10)
Every second, this message file is checked to see if any new messages have arrived. If so, the message section, where the chat script is running, is automatically updated. The brilliant bit is this... No page refresh takes place when this occurs, so no other scripts on the page will be effected!
There's a great example of this behavior on our Streaming Alternative Rock page, where the Live Chat script gracefully coincides with the streaming audio script within the page. As you'll see, the functionality of the chat has no adverse effects on the streaming audio as new messages arrive. Pretty awesome ey?
Built in Accessibility for the Visually Impaired
The Dynamic Live Chat Plugin is also fully accessible to the visually impaired using the JAWS For Windows screen reader! So, in addition to having as many chat rooms as you desire across the web, every implementation of your Dynamic Live Chat Plugin will be fully accessible to the blind.
This is accomplished using JAWS scripts, which JAWS users can download and install directly from your Dynamic Live Chat Plugin. Within the chat section, there is a hidden link which is only visible to screen reader users. This link ("Are you a JAWS user?") displays additional information regarding the available JAWS scripts, and where they can be downloaded.
Want to pretend you are a JAWS user, and see what it looks like?
Click here to display the hidden text.
Now, take a look at the example live chat implementation above... Click the link "Are you a JAWS user?" to see the rest of the accessibility information.
These JAWS scripts are designed to make the Dynamic Live Chat Plugin accessible for JAWS users. Further details regarding the Dynamic Live Chat Plugin can be found at
http://gutterstar.net/dynamic_live_chat.php
How do the scripts work?
The Dynamic Live Chat Scripts integrate directly with the default JAWS Internet Explorer scripts, causing the scripts to initiate automatically during navigation.
These scripts are not domain specific, but rather, are automatically aware of the Dynamic Live Chat Plugin embedded within the page. As a result, these scripts will work with any implementation of the Dynamic Live Chat Plugin, on any page, anywhere around the world.
So what exactly do the scripts do?
When a JAWS user navigates within the Dynamic Live Chat section, the scripts start monitoring the latest incoming messages.
Whenever a new message appears, JAWS will automatically announce the new message text. In this manner, the Dynamic Live Chat Plugin will operate in similar fashion to any instant messenger... The main differences being: The Dynamic Live Chat Plugin is accessible to anyone viewing the page at any time, no additional software is required for use, and usability is completely automatic whenever the Dynamic Live Chat Plugin is encountered on the web.
Moreover, the scripts are designed to handle embedded frames (by default, up to four levels deep), which will allow the scripts to recognize the Dynamic Live Chat Plugin within embedded frames, and operate correctly.
Usage Notes
Simply navigate within the Dynamic Live Chat section using the arrow keys, tab, or header navigation commands. This will automatically cause new messages to be announced as they arrive.
Known Bugs
In some cases, using the Form Field navigation commands, such as F and Shift+F, will not be sufficient to initiate the scripts. To correct this, simply press the up or down arrow key to invoke the scripts.
Is the Dynamic Live Chat Plugin secure?
Yes. Hackers will not be able to compromise your site by submitting malicious code, since all such code tags are automatically stripped when new messages are saved.
What about setup?
The Dynamic Live Chat Plugin was created with the 'Plug and Play' principle in mind. Meaning that, as soon as you plug the script into your page, it works! It really is that simple.
Simply follow the directions specified within the file "msgConfig.php", which contains all of the necessary configuration settings.
To skip these steps and see how the chat script works using all of the default settings, just upload all of the files included with the download to your web server, and open the file SampleChatPage.php like so...
http://domain.com/SampleChatPage.php
An excerpt from the msgConfig.php file follows...
<?
/* To install the GutterStar.net Live Chat Plugin, simply confirm all of the desired settings below, then complete the installation by following the steps at the end of this file.
Server Requirements: PHP4, and a JavaScript enabled browser.
Copyright GutterStar.net, all rights reserved.
*/
/* Choose whether you want the chat message section to be displayed above the input form in chronological order, or beneath the form in reverse order. */
$chat_section_above_form = true;
/* Choose the maximum number of messages to display at one time. All remaining messages will not be saved at runtime. */
$maxMsgs = 10;
/* Confirm your message table format options. Though the table tag attributes can be freely changed, the table tag itself is necessary, as are the TR and TD tags to indicate row and cell divisions. */
/* Confirm your shared message file name. This must have a php extension.
If you wish to include subject-oriented chat rooms on each page instead, all of which are only specific to that particular page, then leave the $file variable blank. */
$file = '';
/* Do you want the main chat section to open automatically when the page loads? true or false */
$startChatAuto = true;
/*
Now, to complete the installation, follow these steps.
1. Insert the following line of code within the PHP page where you want to display the chat script.
<? include("msgChatInsert.php"); ?>
2. Upload all of the chat script files, including the PHP page where the Main Chat Section will be displayed, to the same folder on your server.
3. Now, change the file permissions for all of the following files to 755 to allow execution.
msg.date.format.js
msgChat.js
msgGet.js.php
msgSub.js.php
(Don't forget to include the file that will be displaying the chat script. This too should have a permission of 755.)
Remember: All file names are case sensitive.
That's it! You're all set! The message file will automatically be created when the first message is submitted.
Online chat can refer to any kind of
communication
over the
Internet
, but is primarily meant to refer to direct one-on-one chat or
text-based
group chat
(formally also known as
synchronous conferencing
), using tools such as
instant messaging
applications—
computer programs,
Internet Relay Chat,
talkers
and possibly
MUDs,
MUCKs,
MUSHes
and
MOOes.
The following are common chat programs and protocols:
list of 12 items
• AOL Instant Messenger
(AIM)
• Camfrog
• Campfire
• Gadu-Gadu
• Google Talk
• Internet Relay Chat
(IRC)
• Jabber
(XMPP)
• Meetro
• MOO
• MUD
• MUSH
• PalTalk
list end
list of 11 items
• Pichat
• PSYC
• SILC
• Skype
• Talk
• Talker
• TeamSpeak
(TS)
• Userplane
• Vivox
• Windows Live Messenger
• Yahoo! Messenger
list end
Chat programs supporting multiple protocols:
list of 7 items
• Adium
• IMVU
• Kopete
• Meetro
• Miranda IM
• Pidgin
• Trillian
list end
Online Chatting Sites
• BobChatter
• Flickim
• MeBeam
• Meebo
• RadiusIM
• Userplane
• webChattr
Synchronous conferencing is the formal term used in
science
, in particular in
computer-mediated communication,
collaboration
and
learning
, to describe
online chat
technologies. It has arisen at a time when the term
chat
had a negative connotation. Today it is occasionally also extended to mean
audio/video conferencing
or
instant messaging
systems, given they provide a
text-based
multi-user
chat function. The word synchronous in this case is not to be considered a technical term, but rather describing how it is perceived by humans - chat happens
in real time before your eyes.
Typical synchronous conferencing technologies include
list of 6 items
• Internet Relay Chat
(IRC)
• MUDs
(Multi User Dungeons)
• PSYC
(Protocol for SYnchronous Conferencing)
• SILC
(Secure Internet Live Conferencing protocol)
• Webchats
• XMPP
(Extensible Messaging and Presence Protocol)
list end
PHP
Paradigm
imperative,
object-oriented
Appeared in
1995
Designed by
Rasmus Lerdorf
Developer
The PHP Group
Latest release
5.2.5/
8 November
2007
Typing discipline
Dynamic, weak
Influenced by
C,
Perl,
Java,
C++,
Python
OS
Cross-platform
License
PHP License
Website
http://php.net/
table end
PHP is a computer
scripting language
originally designed for producing
dynamic web pages.
[1]
The name PHP is a
recursive acronym
for PHP: Hypertext Preprocessor.
PHP is used mainly in
server-side scripting
, but can be used from a
command line interface
or in standalone
graphical applications.
Textual User Interfaces
can also be created using
ncurses.
The main implementation is produced by The PHP Group and released under the
PHP License
. This implementation serves to define a
de facto
standard for PHP, as there is no
formal specification
. The most recent version of PHP is 5.2.5, released on
8 November
2007
. It is considered to be
free software
by the
Free Software Foundation.
[2]
PHP was written as a set of
Common Gateway Interface
(CGI) binaries in the
C programming language
by the Danish/Greenlandic programmer
Rasmus Lerdorf
in 1994, to replace a small set of
Perl
scripts he had been using to maintain his
personal homepage.
[3]
Lerdorf initially created PHP to display his
résumé
and to collect certain data, such as how much traffic his page was receiving. Personal Home Page Tools was publicly released on
8 June
1995
after Lerdorf combined it with his own Form Interpreter to create PHP/FI (this release is considered PHP version 2).
[4]
Zeev Suraski
and
Andi Gutmans
, two Israeli developers at the
Technion IIT
, rewrote the
parser
in 1997 and formed the base of PHP 3, changing the language's name to the
recursive initialism
PHP: Hypertext Preprocessor. The development team officially released PHP/FI 2 in November 1997 after months of
beta
testing. Public testing of PHP 3 began and the official launch came in June 1998. Suraski and Gutmans then started a
new rewrite
of PHP's core, producing the
Zend Engine
in 1999.
[5]
They also founded
Zend Technologies
in
Ramat Gan
, Israel, which actively manages the development of PHP.
In May 2000, PHP 4, powered by the Zend Engine 1.0, was released. The most recent update released by The PHP Group, is for the older PHP version 4 code
branch which, as of
January 2008
, is up to version 4.4.8. PHP 4 will be supported by security updates until
August 8,
2008.
[6]
On
July 13,
2004
, PHP 5 was released powered by the new Zend Engine II. PHP 5 included new features such as:
[7]
• Improved support for
object-oriented programming
• The PHP Data Objects extension, which defines a lightweight and consistent interface for accessing databases
• Performance enhancements
• Better support for
MySQL
and
MSSQL
• Embedded support for
SQLite
• Integrated
SOAP
support
• Data
iterators
• Error handling via
exceptions
Currently, PHP 5.x is the only stable version that is being actively developed; active development on PHP 4 ceased at the end of
2007
. However, critical security updates for PHP 4 will be provided until
August 8,
2008.
[8]
PHP 6 is currently under development, and is slated to release in conjunction with the decommission of PHP 4.[citation needed]
As a result of the GoPHP5 initiative, many high profile open source projects ceased to support PHP 4 in new code as of
5 February
2008.
[9]
PHP is a widely-used general-purpose scripting language that is especially suited for
Web development
and can be embedded into HTML. PHP generally runs on a
web server
, taking PHP code as its input and creating Web pages as output. However, it can also be used for
command-line
scripting and
client-side
GUI
applications. PHP can be deployed on most
web servers
and on almost every
operating system
and
platform
free of charge. The PHP Group also provides the complete source code for users to build, customize and extend for their own use.
PHP primarily acts as a
filter
. The PHP program takes input from a file or stream containing text and special PHP instructions and outputs another stream of data for display.
From PHP 4, the PHP parser
compiles
input to produce
bytecode
for processing by the
Zend Engine
, giving improved performance over its
interpreter
predecessor. PHP 5 uses the Zend Engine II.
Originally designed to create dynamic web pages, PHP's principal focus is
server-side scripting
. While running the PHP
parser
with a
web server
and
web browser
, the PHP model can be compared to other server-side scripting languages such as
Microsoft
's
ASP.NET
system,
Sun Microsystems' JavaServer Pages
, and
mod perl
as they all provide dynamic content to the
client
from a web server. To more directly compete with the "framework" approach taken by these systems, Zend is working on the
Zend Framework
- an emerging (as of June 2006) set of PHP building blocks and best practices; other
PHP frameworks
along the same lines include
CakePHP,
PRADO
and
Symfony.
The
LAMP
architecture has become popular in the Web industry as a way of deploying inexpensive, reliable, scalable, secure web applications. PHP is commonly used
as the P in this bundle alongside
Linux,
Apache
and
MySQL
, although the P can also refer to
Python
or
Perl
. PHP can be used with a large number of
relational database management systems
, runs on all of the most popular web servers and is available for many different
operating systems
. This flexibility means that PHP has a wide installation base across the Internet;
As of April 2007
, over 20 million Internet domains were hosted on servers with PHP installed.
[10]
The number of installations is different from the number of sites actually using those installations, but this statistic does reflect the popularity of
PHP.
Examples of popular open source server-side PHP applications include
phpBB,
WordPress
, and
MediaWiki.
PHP also provides a
command line interface
SAPI
for developing shell and desktop applications, daemons, log parsing, or other system administration tasks that have traditionally been the domain of
Perl,
Python,
awk
, or
shell scripting.
[11]
PHP provides bindings to
GUI
libraries such as
GTK+
(with
PHP-GTK),
Qt
with PHP-Qt and text mode libraries like
ncurses
in order to facilitate development of a broader range of
cross-platform
GUI applications.
As with many scripting languages, PHP scripts are normally kept as human-readable source code, even on production webservers. While this allows flexibility,
it can raise issues with security and performance.
Encoders hinder source code
reverse engineering
. Encoders fall broadly into two types; those that hide source code and those that compile code into "optcode."[citation needed]
The downside of this latter approach is that a special extension has to be installed on the server in order to run encoded scripts, however the approach
of encoding compiled code and use of an extension offers typically the best performance, security and opportunity for additional features that may be useful
for developers. Compiled code solutions may exploit the potential for increased security through the use of their own execution engine, although some simpler
solutions rely on the regular PHP engine to execute the compiled code. The most commonly used packages for source code protection are from
Zend Technologies
and
ionCube Ltd.
Code optimizers improve the quality of the compiled code by reducing its size and making changes that can reduce the execution time and improve performance.
The nature of the PHP
compiler
is such that there are often many opportunities for
code optimization.
Accelerators offer performance gains by
caching
the compiled form of a PHP script in
shared memory
to avoid the overhead of
parsing
and
compiling
the code every time the script runs. They may also perform
code optimization
to provide increased execution performance. Both commercial (e.g. Zend Platform) and open source accelerators (e.g. xcache, eAccelerator, APC) are available.
The
PHP Extension and Application Repository
(PEAR) project aims to provide reusable libraries and components for PHP development. PEAR projects are usually written in PHP code using the
Object-oriented programming
paradigm.
PHP has a formal development manual that is maintained by the
free software community
. In addition, answers to many questions can often be found by doing a simple internet search. PHP users assist each other through various media such as
chat, forums, newsgroups and PHP developer web sites. In turn, the PHP development team actively participates in such communities, garnering assistance
from them in their own development effort (PHP itself) and providing assistance to them as well. There are many help resources
[14]
available for the novice PHP programmer.