I am using XMPP.php (i.e XMPP Class) to create a chat application in GTalk. i have put the correct username and password of Gtalk but it is not working. the code i used (got it from GitHub.com)
<?php
include 'XMPP.php';
#Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports
#If this doesn't work, are you running 64-bit PHP with < 5.2.6?
$conn = new XMPPHP_XMPP('talk.google.com', 5222, 'username', 'pass', 'xmpphp', 'gmail.com', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);
try {
echo "Welcome 2 ";
$conn->connect(100, false, true);
$conn->processUntil('session_start');
$conn->presence();
$conn->message('[email protected]', 'This is a test message!');
$conn->disconnect();
} catch(XMPPHP_Exception $e) {
echo "Fail";
die($e->getMessage());
}
?>
and the error (exception) i am getting is
Welcome 2 Fail Could not connect before timeout.
i am using unix based webserver, is there any software needed to run Chatserver or something like that... please help!