Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if($_GET['admin'] === '0' & isset($_GET['msg'])){
- $query = mysql_query("SELECT * FROM `jabber` WHERE `admin`=0");
- echo mysql_error();
- for($x=0;$x<mysql_num_rows($query);$x++){
- $data = mysql_fetch_assoc($query);
- $user= $data['user']; //логин до @
- $pass=$data['pass']; // пароль
- $host=$data['host']; // jabber сервер
- $port=5222; // порт
- $to = $data['to'];
- $msg = $_GET['msg'];
- echo '1';
- $conn = new XMPPHP_XMPP($host, $port, $user, $pass, 'xmpphp', 'jabber.ru', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);
- $conn->useEncryption(false);
- try {
- $conn->connect();
- echo 'connect';
- $conn->processUntil('session_start');
- $conn->presence();
- $conn->message($to, $msg);
- $conn->disconnect();
- echo '2';
- } catch(XMPPHP_Exception $e) {
- die($e->getMessage());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement