Connecting Tech Pros Worldwide Forums | Help | Site Map

Using PHP to send IM or SMS Text

Ray Paseur
Guest
 
Posts: n/a
#1: Jul 17 '05
We broadcast email messages with PHP scripts, but sometimes email is not
timely and we would like to send something that could get there faster.

Can anyone tell me about how to send Instant Messages (Y, AOL, MSN,
Trillian, etc.) or SMS from within a script?

Please copy your reply off group to "access (a) NatPresCh .org" - hopefully
I will see your message there sooner. And thanks for any ideas.

~Ray



Michael Vilain
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Using PHP to send IM or SMS Text


In article <G%UAd.15464$jn.15167@lakeread06>,
"Ray Paseur" <ray@earplugsnon-aol.com> wrote:
[color=blue]
> We broadcast email messages with PHP scripts, but sometimes email is not
> timely and we would like to send something that could get there faster.
>
> Can anyone tell me about how to send Instant Messages (Y, AOL, MSN,
> Trillian, etc.) or SMS from within a script?
>
> Please copy your reply off group to "access (a) NatPresCh .org" - hopefully
> I will see your message there sooner. And thanks for any ideas.
>
> ~Ray[/color]

Since the IM interfaces aren't standard and they keep changing because
the vendor wants to control the client that can send/receive messages
from them, you're probably limited on what you can do from a php script.
Many cell phone vendors allow sending email messages through their
gateway to cell phones. All I had to do with eBay was give them the
email address for my cell to get SMS notification.

Even if you manage to get the IM network protocol figured out, it could
change at any time and stop working. With multiple vendors doing that
to you, I ask you "do you really want to go there?" Is the PHB that's
asking for this aware of the volatility of these applications? How much
time and money are they willing to spend to implement and maintain this
feature?

I think you can do SMS using the mail() function without a problem.
There's already stuff in CPAN on AIM:

http://search.cpan.org/search?query=...ssage&mode=all

Unless you've built php as a CLI, php applications are tied to a web
page through mod_php. If you write it in perl, it can be run as as CLI
script via cron. If this paragraph doesn't mean anything to you, hire a
consultant.

--
DeeDee, don't press that button! DeeDee! NO! Dee...



Daniel Tryba
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Using PHP to send IM or SMS Text


Michael Vilain <vilain@spamcop.net> wrote:[color=blue]
> Unless you've built php as a CLI, php applications are tied to a web
> page through mod_php. If you write it in perl, it can be run as as CLI
> script via cron. If this paragraph doesn't mean anything to you, hire a
> consultant.[/color]

Getting perl involed for this reason is silly. Running a PHP script
thru a webserver from cron is a simple as:
0 * * * * lynx -dump http://localhost/path/to/script.php > /dev/null

Manuel Lemos
Guest
 
Posts: n/a
#4: Jul 17 '05

re: Using PHP to send IM or SMS Text


Hello,

on 12/30/2004 01:19 PM Ray Paseur said the following:[color=blue]
> We broadcast email messages with PHP scripts, but sometimes email is not
> timely and we would like to send something that could get there faster.[/color]

When I need to send urgent messages I scrap the local MTA and inject it
directly in the SMTP server of the recipient. It can't be faster than that.

I use these classes to compose and send urgent messages using the direct
delivery mode of the SMTP class. There is also a wrapper function named
urgent_mail() that emulates the mail function but first attempts to send
the message directly and then fallback to mail() if immediate delivery
is not possible.


http://www.phpclasses.org/mimemessage

http://www.phpclasses.org/smtpclass

[color=blue]
> Can anyone tell me about how to send Instant Messages (Y, AOL, MSN,
> Trillian, etc.) or SMS from within a script?[/color]

You may want to take a look here where you may find several solutions
for sending instant messages using different networks:

http://www.phpclasses.org/browse/class/66.html

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Tim Van Wassenhove
Guest
 
Posts: n/a
#5: Jul 17 '05

re: Using PHP to send IM or SMS Text


On 2004-12-30, Ray Paseur <ray@earplugsnon-aol.com> wrote:[color=blue]
> We broadcast email messages with PHP scripts, but sometimes email is not
> timely and we would like to send something that could get there faster.
>
> Can anyone tell me about how to send Instant Messages (Y, AOL, MSN,
> Trillian, etc.) or SMS from within a script?[/color]

I think you'll get the best result if you write/find yourself something
that implements the jabber protocol. Because then you can use the
transport-plugins to send your messages to other networks (Y!, AIM, ...)



--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.info>
Sadara
Guest
 
Posts: n/a
#6: Jul 17 '05

re: Using PHP to send IM or SMS Text


Daniel Tryba wrote:[color=blue]
> Michael Vilain <vilain@spamcop.net> wrote:
>[color=green]
>>Unless you've built php as a CLI, php applications are tied to a web
>>page through mod_php. If you write it in perl, it can be run as as CLI
>>script via cron. If this paragraph doesn't mean anything to you, hire a
>>consultant.[/color]
>
>
> Getting perl involed for this reason is silly. Running a PHP script
> thru a webserver from cron is a simple as:
> 0 * * * * lynx -dump http://localhost/path/to/script.php > /dev/null
>[/color]

or:

wget http://localhost/path/to/script.php
Ray Paseur
Guest
 
Posts: n/a
#7: Jul 17 '05

re: Using PHP to send IM or SMS Text


Thanks to all who offered suggestions. This link appears to hold the most
promise:
http://www.phpclasses.org/browse/class/66.html

When I get something working, I will post it.
~Ray

"Manuel Lemos" <mlemos@acm.org> wrote in message
news:41D44B7D.9090204@acm.org...[color=blue]
> Hello,
>
> on 12/30/2004 01:19 PM Ray Paseur said the following:[color=green]
>> We broadcast email messages with PHP scripts, but sometimes email is not
>> timely and we would like to send something that could get there faster.[/color]
>
> When I need to send urgent messages I scrap the local MTA and inject it
> directly in the SMTP server of the recipient. It can't be faster than
> that.
>
> I use these classes to compose and send urgent messages using the direct
> delivery mode of the SMTP class. There is also a wrapper function named
> urgent_mail() that emulates the mail function but first attempts to send
> the message directly and then fallback to mail() if immediate delivery is
> not possible.
>
>
> http://www.phpclasses.org/mimemessage
>
> http://www.phpclasses.org/smtpclass
>
>[color=green]
>> Can anyone tell me about how to send Instant Messages (Y, AOL, MSN,
>> Trillian, etc.) or SMS from within a script?[/color]
>
> You may want to take a look here where you may find several solutions for
> sending instant messages using different networks:
>
> http://www.phpclasses.org/browse/class/66.html
>
> --
>
> Regards,
> Manuel Lemos
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> PHP Reviews - Reviews of PHP books and other products
> http://www.phpclasses.org/reviews/
>
> Metastorage - Data object relational mapping layer generator
> http://www.meta-language.net/metastorage.html[/color]


Closed Thread