1. Contents
===============================================================================

	1. Contents
	2. About The Script
	3. Installing & Configuring The Script
	4. Using An Image To Display Your Status
	5. Using A Text Based Or HTML Message To Display Your Status
	6. Using The Script
	7. Possible Errors
	8. Whats New
	9. Other Information

2. About The Script
===============================================================================

IM Indicator PHP is script for showing your ICQ and/or Yahoo! Messenger status
on your webpage. The online message will be displayed when you are logged in and 
the offline message is displayed when you are logged out. Unlike the default
scripts provided by Yahoo & ICQ this script allows you the choice of:

	o Displaying a custom image of your choosing
	o Displaying a custom text based message of your choice

The custom text string can itself contain HTML code, which means it can be used
for flash content etc.

IM Indicator PHP may be modified for your personal use, but cannot be distributed
without the written permission of the author, QAtlantis.com

This readme file relates to version 1.3, last updated 19 Feb 2003.


3. Installing & Configuring The Script
===============================================================================

Open imi.php in a text editor.

Edit any required variables to match your requirements (see steps 5 & 6)

Upload the PHP file and images (if required) to your server.


4. Using An Image To Display Your Status
===============================================================================

Note: medium below refers to either icq or yahoo

Locate $use_images and change it to true

If you wish each medium to be on its own line, then set $add_newline to true,
otherwise set it to false.

Locate $onlineimage_medium and change it to show the path to your "online" image 
for this medium. This can be a URL (eg http://www.yourdomain.com/images/online.gif) 
or a relative path (e.g. /images/online.gif)

Locate $onlinewidth_medium and $onlineheight_medium and change them to reflect the 
height and width of your "online" image (in pixels).

Repeat for offline and disabled (for ICQ) variables.

The following images in the 'alternative images' directory are from ICQ/Yahoo! themselves:
icq-on2.gif	icq-off2.gif	icq-dis2.gif 
yahoo-on1.gif	yahoo-off1.gif
yahoo-on2.gif	yahoo-off2.gif
yahoo-on3.gif	yahoo-off3.gif


5. Using A Text Based Message To Display Your Status
===============================================================================

Locate $use_images and change it to false

If you wish each medium to be on its own line, then set $add_newline to true,
otherwise set it to false.

Locate $textonline_medium and change to reflect your custom "online" message.

Repeat for offline and disabled (for ICQ) variables.


6. Using The Script
===============================================================================

Once the script is installed you can use it in 3 ways, either, call it into 
your page using SSI (server side includes), include it in a PHP file or run
the script direct from the browser.

To use the script with SSI you just use a standard SSI virtual include:
e.g.

<!--#include virtual="imi.php?icq=xxxxxx&yahoo=xxxxxx" -->

where xxxxxx is YOUR icq/yahoo id and imi.php is in the same directory as you
.shtml file.

NOTE: Remember to name your page .shtml if you need to use SSI.
      Some servers do not support SSI. Check with you host first

To use the script from a PHP file, you just use a standard PHP include():
e.g.

<?php include('imi.php?icq=xxxxxx&yahoo=xxxxxx'); ?>

Alternativly if you want to use the script on it's own just type the following
into your web browser:

http://www.yourdomain.com/path/to/imi.php?icq=xxxxxx&yahoo=xxxxxx

Where yourdomain.com is the host name of the website and xxxxxxxx is YOUR 
icq number


7. Possible Errors
===============================================================================

Section A - Incorrect Status
	If you are being shown an incorrect status, then check that you have
	specified the ICQ/Yahoo! ID correctly.

	An invalid ICQ number will result in a disabled status
	An invalid Yahoo! ID will result in offline status

Section B - ICQ Errors.
  [ERROR - Could not connect to server (status.icq.com)]
	PHP cannot access the ICQ servers. This is most likely because:
	 * The ICQ servers are down
	 * There is a network problem between your server and ICQ
	 * PHP is configured incorrectly
	 * ICQ has decomissioned the server

  [ERROR - ICQ Number Must contain ONLY numeric values]
	You are entering your ICQ number incorrectly. Only numbers 0-9
	are allowed by ICQ.

  [ERROR - Unexpected Response From ICQ]
  [ERROR - Unexpected Response From ICQ - No Location Header]
	These usually occur for one of two reasons:
	 * There is a temporary problem with the ICQ servers, and you will
	   need to wait for ICQ to fix the problem
	 * ICQ have changed they way their script works, and you will need to 
	   get a new version of this script from QAtlantis.com
	This will error will be followed by some of the data which was recieved
	from ICQ, which may assist us in finding the problem.

Section C - Yahoo! Errors
  [ERROR - Could not connect to server (http://opi.yahoo.com/online?u=xxxxxx&m=t)]
	PHP cannot access the Yahoo! servers. This is most likely because:
	 * The Yahoo! servers are down
	 * There is a network problem between your server and Yahoo!
	 * PHP is configured incorrectly
	 * Yahoo! has decomissioned the server

  [ERROR - Unexpected Response From Yahoo]
	These usually occur for one of two reasons:
	 * There is a temporary problem with the Yahoo! servers, and you will
	   need to wait for Yahoo! to fix the problem
	 * Yahoo! have changed they way their script works, and you will need to 
	   get a new version of this script from QAtlantis.com
	This will error will be followed by the data which was recieved from
	Yahoo!, which may assist us in finding the problem.


8. Whats New
===============================================================================

Version 1.3
	 * Updated to support changes to ICQ servers
	 * Updated to support changes to Yahoo! servers


9. Other Information
===============================================================================

Included in the zip file there are suitably named images for showing your status.
You may freely use these to display your status or you may create your own.

This script is compatable with Linux and Microsoft Windows 2000.
It has NOT been tested on Windows NT4/9x or Mac OS.