Other Communication Subclasses

Other Communication Subclasses

This chapter sticks firmly to e-mail. That's simply because it's the most common form of communicating with users on the Web. It's free, and everybody knows the basics.

But the whole point of the Communication class is that it can be extended to form virtually anything a fax, an SMS, a voice call. But how would you go about implementing such facilities? Here are a couple of suggestions.

SMS Text Messaging

A number of gateway providers have sprung up in the last year or so who will send messages on your behalf for a small fee. Rather than use physical cellular phones to send the messages, they use direct links straight into the cellular networks. This saves time and money.

The interface is usually via a simple HTTP POST. Search the Web for "SMS Gateways'' if you're curious.

The more instant alternative is via a serial cable to your cellular phone, if your phone supports it. Again, the Web has more details on the API for communicating with your phone in this way. The trick is to treat it as though it were a modem; a Hayes-compatible AT command set is perfect for such communication. More information can be found at: http://www.cellular.co.za/sms_at_commands.htm.

Fax

Rather than physically render a fax page and fire it down a modem, a far simpler solution is to use one of the many e-mail-to-fax gateways in existence today. Most of these will accept a TIFF or similar file e-mailed as an attachment to a special e-mail address, upon which the gateway will send the fax on your behalf. By using PHP's built in graphics functions, you should be able to compose a TIFF on the fly, e-mail it to such a catcher address, and create an instant, dynamically produced fax as a result.

An example of such a service is eFax; see http://www.efax.com/ for more information.



Professional PHP5 (Programmer to Programmer Series)
Professional PHP5 (Programmer to Programmer Series)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 182
BUY ON AMAZON

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net