{"id":18927057,"url":"https://github.com/candy-chat/xmpp-prebind-php","last_synced_at":"2025-07-17T03:30:44.474Z","repository":{"id":45105427,"uuid":"2190162","full_name":"candy-chat/xmpp-prebind-php","owner":"candy-chat","description":"PHP class for creating a session on server side to an XMPP server","archived":false,"fork":false,"pushed_at":"2022-01-08T02:33:52.000Z","size":192,"stargazers_count":63,"open_issues_count":16,"forks_count":43,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-11-15T15:48:47.221Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/candy-chat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-11T09:15:41.000Z","updated_at":"2024-03-07T22:11:16.000Z","dependencies_parsed_at":"2022-09-16T13:47:09.653Z","dependency_job_id":null,"html_url":"https://github.com/candy-chat/xmpp-prebind-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candy-chat%2Fxmpp-prebind-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candy-chat%2Fxmpp-prebind-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candy-chat%2Fxmpp-prebind-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candy-chat%2Fxmpp-prebind-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/candy-chat","download_url":"https://codeload.github.com/candy-chat/xmpp-prebind-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226201954,"owners_count":17589341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T11:18:01.219Z","updated_at":"2024-11-24T18:02:31.281Z","avatar_url":"https://github.com/candy-chat.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"XMPP Prebind for PHP\n====================\n\nThis class is for [prebinding](http://metajack.im/2009/12/14/fastest-xmpp-sessions-with-http-prebinding/) a XMPP Session with PHP.\n\nUsage\n=====\n* Clone the repo\n* In your file where you want to do the prebinding:\n\n```php\n/**\n * Comment here for explanation of the options.\n *\n * Create a new XMPP Object with the required params\n *\n * @param string $jabberHost Jabber Server Host\n * @param string $boshUri    Full URI to the http-bind\n * @param string $resource   Resource identifier\n * @param bool   $useSsl     Use SSL (not working yet, TODO)\n * @param bool   $debug      Enable debug\n */\n$xmppPrebind = new XmppPrebind('your-jabber-host.tld', 'http://your-jabber-host/http-bind/', 'Your XMPP Clients resource name', false, false);\n$xmppPrebind-\u003econnect($username, $password);\n$xmppPrebind-\u003eauth();\n$sessionInfo = $xmppPrebind-\u003egetSessionInfo(); // array containing sid, rid and jid\n```\n\n* If you use [Candy](http://amiadogroup.github.com/candy), change the `Candy.Core.Connect()` line to the following:\n\n```javascript\nCandy.Core.attach('\u003c?php echo $sessionInfo['jid'] ?\u003e', '\u003c?php echo $sessionInfo['sid'] ?\u003e', '\u003c?php echo $sessionInfo['rid'] ?\u003e');\n```\n\n* You should now have a working prebinding with PHP\n\nDebugging\n=========\nIf something doesn't work, you can enable Debug. Debug output is logged to [FirePHP](http://www.firephp.org/), so you have to install that first.\n\nOther Languages\n===============\nThere exist other projects for other languages to support a prebind. Go googling :)\n\nBe aware\n========\nThis class is in no way feature complete. There may also be bugs. I'd appreciate it if you contribute or submit bug reports.\n\nThanks.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandy-chat%2Fxmpp-prebind-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcandy-chat%2Fxmpp-prebind-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandy-chat%2Fxmpp-prebind-php/lists"}