The online racing simulator
InSim Login Problem (first byte in packet does not match size)
Hello

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, &$errstr3);

// 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);
?>

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
#2 - filur
The first byte in your packet is the ASCII character "I". There is no "ISI\0" string in this packet, ISP_ISI is an integer constant. Make sure you've got the latest edition of docs/InSim.txt
Quote from filur :The first byte in your packet is the ASCII character "I". There is no "ISI\0" string in this packet, ISP_ISI is an integer constant. Make sure you've got the latest edition of docs/InSim.txt

You're right ... found the "ISI" Part in a Docu ... but its outdated with the latest version ... changed the first 4 byte's and logged in just fine ... thx
#4 - Stuff
hi
hi,
i got the same problem
but,i dont now what to change and what does it has to be?

maybe someone has a insim file that i can download?
Have a look in the manual's InSim and hosting sections
edit: irrelevant.

FGED GREDG RDFGDR GSFDG