@ MAC en utilisant PHP !

Bonjour,

Je suis entrain de développer une application PHP gestion réseau LOCAL,projet demandé par prof PHP,
je trouve une difficulté de trouver un script qui réalise la fonction ARP et qui marche ! sachant qu'1 des objectifs de l'application est de récuperer l'@ MAC à partir de l'@ IP ( protocole ARP) !!
AIDEZ MOI SVP c urgent

2 réponses

  1. Modérateur
    En cherchant un peu, sous Linux:
    johand@osiris: ~ $ cat /proc/net/arp
    IP address       HW type     Flags       HW address            Mask     Device
    192.168.0.1      0x1         0x2         00:19:5b:95:4e:8c     *        eth0
    192.168.0.8      0x1         0x2         00:26:5a:0b:fe:9f     *        eth0
    192.168.0.6      0x1         0x2         00:10:d7:82:c0:e2     *        eth0
    Tu lis ce fichier et en tire les informations.

    1. merci jisisv ,
      j'ai trouvé ce script et enfin ça marche :)
      <?php
      ob_start();
      system("ipconfig /all");
      $mycom=ob_get_contents();
      ob_clean();
      $findme = "physique";
      $pmac = strpos($mycom, $findme);
      $mac=substr($mycom,($pmac+36),17);
      echo $mac;
      ?>