function byte4toint($procnumber)
{
return ord($procnumber{0}) + (ord($procnumber{1}) << 8) + (ord($procnumber{2}) << 16) + (ord($procnumber{3}) << 24);
}
function byte2toint($procnumber)
{
return ord($procnumber{0}) + (ord($procnumber{1}) << 8);
}
now i thought i had sorted it in vb.net as the byte4toint works fine and gives me the correct infomation but byte2toint dont... byte2toint is to get the Port number the server is running on and its giving me the wrong port number but also giving me the same port number for all servers thats running on different ports, this is what i have done in vb.net (neary the same as php)
Function byte4toint(ByVal proc4number) Return Asc(proc4number(0)) + (Asc(proc4number(1)) << 8) + (Asc(proc4number(1)) << 16) + (Asc(proc4number(3)) << 24) End Function Function byte2toint(ByVal PortNumber) Return Asc(PortNumber(0)) + (Asc(PortNumber(1)) << 8) End Function
thanks for your time to read this
Kev

New Topic/Question
Reply




MultiQuote





|