summaryrefslogtreecommitdiff
path: root/www-ssl/inc
diff options
context:
space:
mode:
authorcookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-11-08 21:00:04 +0000
committercookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-11-08 21:00:04 +0000
commit07776d01ef06dcd25df25303c92a9fa8c650ca45 (patch)
tree4d0bebaa1b4803a9641e3cd50a1efef2be61349f /www-ssl/inc
parent54eddebc929ca92009234cbc030522125a9a2019 (diff)
grundgeruest fur srevice (jabberbot)
git-svn-id: svn://svn.cccv.de/engel-system@150 29ba0400-6e00-0410-a75a-ca02368028f8
Diffstat (limited to 'www-ssl/inc')
-rw-r--r--www-ssl/inc/config_MessegeServer.php8
-rw-r--r--www-ssl/inc/funktion_SendMessenges.php18
2 files changed, 26 insertions, 0 deletions
diff --git a/www-ssl/inc/config_MessegeServer.php b/www-ssl/inc/config_MessegeServer.php
new file mode 100644
index 00000000..3454ae0c
--- /dev/null
+++ b/www-ssl/inc/config_MessegeServer.php
@@ -0,0 +1,8 @@
+<?
+// Set the ip and port we will listen on
+define( SERVER_ADDRESS, "127.0.0.1" );
+define( SERVER_PORT, 9000 );
+
+define( DEBUG, TRUE);
+
+?>
diff --git a/www-ssl/inc/funktion_SendMessenges.php b/www-ssl/inc/funktion_SendMessenges.php
new file mode 100644
index 00000000..c6676c6c
--- /dev/null
+++ b/www-ssl/inc/funktion_SendMessenges.php
@@ -0,0 +1,18 @@
+<?php
+
+
+function SendData($Data)
+{
+ include("./inc/config_MessegeServer.php");
+ // Create a UDP socket
+ $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+ //send packed
+ socket_sendto($sock, $Data, 9999, 0x4, SERVER_ADDRESS, SERVER_PORT);
+}
+
+function SendMessageJabber($Adresse, $Nachricht)
+{
+ SendData( "#message $Adresse $Nachricht");
+}
+
+?>