This commit is contained in:
Wolfgang Hottgenroth 2007-11-12 21:55:02 +01:00
commit e92aba90b1

15
client/php/yadync.php Normal file
View File

@ -0,0 +1,15 @@
<?php
$sharedSecret = "test123";
$dynid = "testhost";
$time = time();
$in = "$dynid $sharedSecret $time";
$digest = bin2hex(mhash(MHASH_MD5, $in));
$msg = "$dynid $time $digest";
$len = strlen($msg);
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_sendto($socket, $msg, $len, 0, '127.0.0.1', 8053);
socket_close($socket);
?>