Hello
I want to connect to InSim with PHP and setup a local LFS Server (newest version of dedi) and used following php script:
The "echo" shows me 44, so packetsize is right, but when i start the php script my LFS Dedi shows me:
"InSim: first byte in packet does not match size"
So whats wrong? Cant find the failure :/
Greetings
crazyiven
I want to connect to InSim with PHP and setup a local LFS Server (newest version of dedi) and used following php script:
<?php
$errno = 0;
$errstr = "";
$sender = fsockopen("udp://127.0.0.1", "29999", &$errno, &$errstr, 3);
// isi packet
$packet = "ISI\0"; // ISP_ISI, ReqI, Zero
$packet .= pack("S", 0); // word UDPPort
$packet .= pack("S", 0); // word Flags
$packet .= pack("c", 0); // byte Sp0
$packet .= pack("c", "LFSS"); // byte Prefix
$packet .= pack("S", 0); // word Interval
$packet .= str_pad("adminPW", 16, "\0"); // char Admin[16];
$packet .= str_pad("Test IT", 16, "\0"); // char IName[16];
// echo strlen($packet);
fwrite($sender, $packet);
?>
"InSim: first byte in packet does not match size"
So whats wrong? Cant find the failure :/
Greetings
crazyiven