Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

XMPP Server

Posted on 2007-03-19
6
774 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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
Facing this issue for maven proxy setting 2 20
Python 3.5.2 - Script Help 3 66
Perl Versus AWK? 7 48
java mysql insert application 14 26
Introduction On September 29, 2012, the Python 3.3.0 was released; nothing extremely unexpected,  yet another, better version of Python. But, if you work in Microsoft Windows, you should notice that the Python Launcher for Windows was introduced wi…
Flask is a microframework for Python based on Werkzeug and Jinja 2. This requires you to have a good understanding of Python 2.7. Lets install Flask! To install Flask you can use a python repository for libraries tool called pip. Download this f…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

840 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