By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,346 Members | 2,331 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,346 IT Pros & Developers. It's quick & easy.

Using PHP to send IM or SMS Text

P: n/a
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
Jul 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
In article <G%UAd.15464$jn.15167@lakeread06>,
"Ray Paseur" <ra*@earplugsnon-aol.com> wrote:
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


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...

Jul 17 '05 #2

P: n/a
Michael Vilain <vi****@spamcop.net> wrote:
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.


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

Jul 17 '05 #3

P: n/a
Hello,

on 12/30/2004 01:19 PM Ray Paseur said the following:
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.
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

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


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
Jul 17 '05 #4

P: n/a
On 2004-12-30, Ray Paseur <ra*@earplugsnon-aol.com> wrote:
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?


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>
Jul 17 '05 #5

P: n/a
Daniel Tryba wrote:
Michael Vilain <vi****@spamcop.net> wrote:
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.

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


or:

wget http://localhost/path/to/script.php
Jul 17 '05 #6

P: n/a
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" <ml****@acm.org> wrote in message
news:41**************@acm.org...
Hello,

on 12/30/2004 01:19 PM Ray Paseur said the following:
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.


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

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


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

Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.