Solved

XMPP Server

Posted on 2007-03-19
6
775 Views
Last Modified: 2011-10-03
I'm looking for an automated way for my server to send/receive messages over Google Talk (which uses the XMPP standard). Specifically, I'd like whatever program I have running on my server to log in to a (given) Google Talk account (which I created), and if a message is sent to said account, the server would respond with an appropriate response, based on what it received.

To get a better picture of what I'm talking about, check out www.imified.com. They offer a service where, literally, you send a message to their account (i.e. imified@gmail.com), it gives you a menu of options. I would like to do something similar.

So I'm looking for ideas to get started on this, possible server software packages to install, etc. I have support for PHP, PERL, Python, Ruby, and Java on my particular server. I'd probably prefer something in any of the first four languages rather than Java, but whatever works is fine. Thanks!
0
Comment
Question by:soapergem
  • 3
  • 3
6 Comments
 
LVL 6

Author Comment

by:soapergem
ID: 18754420
Oh, by the way, I think the question naturally implies that a true persistent connection (or something equivalent) would be needed, since the server would be sitting around, literally waiting for someone to send an IM to it.
0
 
LVL 39

Accepted Solution

by:
Adam314 earned 500 total points
ID: 18755821
use Net::XMPP;

$Con = new Net::XMPP::Client();
$Con->SetCallbacks(...);
$Con->Execute(hostname=>"jabber.org",
                  username=>"bob",
                  password=>"XXXX",
                  resource=>"Work'
                 );

#Don't disconnect
#$Con->Disconnect();

See here for descriptions of the callbacks:
http://search.cpan.org/~reatmon/Net-XMPP-1.0/lib/Net/XMPP/Protocol.pm
0
 
LVL 6

Author Comment

by:soapergem
ID: 18756948
Thanks! Would you also happen to know where I can get ahold of the XML::Stream and Digest::SHA1 modules? The README file said they were required, and my webhost has neither one installed, so I'll need them to make this work.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 39

Expert Comment

by:Adam314
ID: 18757056
Both are available on CPAN
0
 
LVL 6

Author Comment

by:soapergem
ID: 18758571
Thanks very much, that looks like exactly what I was looking for! Do you know of any good tutorials (with examples, maybe?) on either this Net-XMPP package, or on Perl in general? I've never really used Perl before, but it looks like I'm going to have to learn it...
0
 
LVL 39

Expert Comment

by:Adam314
ID: 18759724
For perl in general:
http://perldoc.perl.org/index-tutorials.html

For the modules:
http://search.cpan.org/~reatmon/Net-XMPP-1.0/lib/Net/XMPP.pm
http://search.cpan.org/~reatmon/Net-XMPP-1.0/lib/Net/XMPP/Protocol.pm

Other than that, there are plenty of books, or just do google searches on particular topics.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ejb entity bean example 2 31
how to debug htl and js pages 8 53
swing controls 2 21
wild fly 8 startup error 2 37
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question