Android : Android xmpp connect with php

on Wednesday, December 10, 2014


Hey friends i knows this may be off topic but many developer on internet is still searching on internet please help the thing is what should i use android library for xmpp with php and how can i connect to my php server i have heard that xmpphp but how should i installed on my server and how should i start all i need is the start up please help me all i googled and found just this help me to start up



<?php
include("xmpp.php");

//username = user without domain, "user" and not "user@server" - home is the resource
$conn = new XMPPHP_XMPP('my.server', 5222, 'username', 'password', 'home');
// Enables TLS - enabled by default, call before connect()!
$conn->useEncryption(true);
$conn->connect();
$conn->processUntil('session_start');
$conn->message('someguy@someserver.net', 'This is a test message!');
$conn->disconnect();
?>

0 comments:

Post a Comment