summaryrefslogtreecommitdiff
path: root/www-ssl/inc
diff options
context:
space:
mode:
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");
+}
+
+?>