Zur deutschen Version wechseln…

SMS/E-Mail Ticker – Manual

ToC

Intro

With this classes it is possible to include a little ticker on your homepage which is based on an e-mail account. It’s original propose is to function as a SMS-ticker for those who can’t affort to pay a SMS-carrier. If the users GSM cell phone is able to send/receive SMS (Short Message Service) it should be no problem to send a SMS to a mail address, which then is displayed on the webpage. Of course you can also use a normal Mail-Client for that.
The Idea for this is based on the scripts from Markus Fraikin. But here everything is written in OO.

Preparation

First, the installed PHP-Version needs to have the IMAP/POP functions enabled. Then you create a new e-mail account, for example ticker@mydomain.com and edit the e-mail settings in the ticker_settings.ini file.

The users job

He/Her must have a GSM cell phone which is able to send/receive SMS, but a normal mail-client will also do the job. To prevent displaying spam-mail the user has to write a special string in front of the actual text which can be defined in the ticker_settings.ini file.
Since most telecom-companies add a short ad after the original text, the user should also write a certain string at the end of his message so the script knows where to cut the real message. This string can also be defined in the ticker_settings.ini file. The maximum amount of characters to be displayed can be changed there too.

Including the scripts

Including the scripts into the page is easy:

ob_start();
include_once('class.Ticker.inc.php');
$ticker = new Ticker(6);

foreach ($ticker->getMessageList() as $id) {
  $message = $ticker->getMessage($id);
  echo '<p>ID: ' . $message->getID() . '<br />';
  echo 'Datum: ' . $message->getTimestamp() . '<br />';
  echo 'Text: ' . $message->getText() . '</p>';
} // end foreach

ob_end_flush();

First you create a new Ticker object. Then you go through every message in a loop. The design is up to the webmaster.

Other Options

…which can be set in the ticker_settings.ini file:

Notes


Author: Flaimo
Date: 2003-05-27
URLs:
Projectpage
Sample-Script


Rate Our Script @ HotScripts.com

Rate Our Script @ PHP-Resource.de

Rate Our Script @ phparchiv.de (10 is best)