PHP code example of fiv / xmpp
1. Go to this page and download the library: Download fiv/xmpp library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fiv / xmpp example snippets
$user = '[email protected]';
$password = 'password';
$conn = new \Fiv\Xmpp\Xmpp('talk.google.com', 5222, $user, $password, 'xmpphp', 'gmail.com', true, \Fiv\Xmpp\Log::LEVEL_INFO);
$conn->connect();
$conn->processUntil('session_start');
$conn->message("[email protected]/gmail.00145456", "test message");
$conn->disconnect();