Funciono en xp y winmen y 98 dentro de la intranet que tengo
pero solo con maquinas teniendo cable de red
porque con cliente inalambricos solo en win98 en xp pro no me salia nada
checa esta pagina
http://www.experts-exchange.com/Web/..._20562144.html
aqui esta el codigo
<?php
/*
Getting netbios info
CopyLeft 2002 (GNU GPL V2) by polo
*/
error_reporting(E_ALL);
/* get the ip of the client */
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
{
$ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
} else {
$ip = $_SERVER["REMOTE_ADDR"];
}
echo 'ip : '.$ip.'<br>';
/* send a "special" packet */
$fp = fsockopen('udp://'.$ip, 137);
fwrite($fp, "\x80b\0\0\0\1\0\0\0\0\0\0 CKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\0\0!\0\1");
/* wait 2 secs, and get the data */
socket_set_timeout($fp, 2);
$data = fread($fp, 256);
/* get netbios records number */
$nbrec = ord($data[56]);
/* display nebios records : the username is a record of type 3 */
echo '<table border="1">';
echo '<tr><th>no</th><th>type</th><th>value</th></tr>';
for($i = 0; $i < $nbrec; $i++) {
$offset = 18 * $i;
printf ("<tr><td>%02d</td><td>%02X</td><td>%s</td></tr>",
$i,
ord($data[72 + $offset]),
trim(substr($data, 57 + $offset, 15)));
}
echo '</table>';
?>