shuhaib864 / xmpphp

Automatically exported from code.google.com/p/xmpphp
0 stars 0 forks source link

Account registration #64

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
May add function for register new jabber account on server?

It function was in old jabber class:
Class.Jabber.PHP v0.1.3.1
(c) 2002 Carlo "Gossip" Zottmann
http://phpjabber.g-blog.net *** gossip@jabber.g-blog.net

(http://www.phpclasses.org/browse/package/995.html)

Original issue reported on code.google.com by ivan.bor...@gmail.com on 2 Aug 2009 at 9:29

GoogleCodeExporter commented 8 years ago
This would be very useful to me, in fact I desperately need a function to 
register a 
new account.  Or at least, some alternative way of doing it? Thanks

Original comment by owen.sou...@gtempaccount.com on 18 Jan 2010 at 3:28

GoogleCodeExporter commented 8 years ago
This document http://xmpp.org/extensions/xep-0077.html describes how to create 
new account.

With patch below I can create accounts.
It works but it contains very ugly code.
I don't know select_socket things, I used fwrite.

How to use:

include 'XMPPHP/XMPP.php';
$conn = new XMPPHP_XMPP('localhost', 5222, 'anonymous', '', 'xmpphp', 
'server.tld', true, $loglevel=XMPPHP_Log::LEVEL_INFO);

try {
    $conn->connect();
    $conn->register("new_user", "old_password", "new_user@server.tld");
    $conn->disconnect();
} catch(XMPPHP_Exception $e) {
    die($e->getMessage());

Original comment by kalys.os...@gmail.com on 30 Oct 2010 at 9:37

Attachments:

GoogleCodeExporter commented 8 years ago
it's not working in ejabbered!

I register one user it's working then again i am going to register it gives 
error of 

fclose(); //like no connection there so...
if i fix this error with 
if(!$this->socket){
fclose($this->socket);
}

however it's not a solution because user not registered in server...

After some time i try it can register a user then again gives error....

Please help me!

I really get out of this issue.....

Thanks
Nishant

Original comment by nishant8...@gmail.com on 5 Jan 2012 at 2:35

GoogleCodeExporter commented 8 years ago
halla!

Original comment by Foundati...@gmail.com on 3 May 2013 at 3:16

GoogleCodeExporter commented 8 years ago
fclose(); //like no connection there so...
if i fix this error with 
if(!$this->socket){
fclose($this->socket);
}

not working error
Please help me!

Original comment by azadm...@gmail.com on 11 Jul 2013 at 9:20

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
$conn = new XMPPHP_XMPP('localhost', 5222, 'anonymous', '', 'xmpphp', 
'localhost', true, $loglevel=XMPPHP_Log::LEVEL_INFO);
try {
    $conn->connect();
    $conn->register("testchat", "test");
    $conn->disconnect();
} catch(XMPPHP_Exception $e) {
    die($e->getMessage());
}
----
But this is not working. Please help me

Original comment by madagoni...@gmail.com on 11 Jun 2014 at 7:50