merhaba
bir web site projemde bağlı olduğum wifi adını göstermek istiyorum PHP de mümkün mü mümkünse nasıl yapabilirim?
Bağlı Wifi Adını Gösterme
3
●352
- 13-06-2015, 06:21:02@emrenazli; aşağıdaki betik ile talep ettiğiniz işlemi yapabilirsiniz.
Örnek;

<?php try { $response = shell_exec('netsh wlan show interfaces'); $lines = explode("Hosted network status", $response); $lines = explode("\n", $lines[0]); $lines = array_map('trim', $lines); $wlanInterfaces = array(); $wlanInterfaceCount = preg_match('/(?<![\d-])(0*[1-9]\d*)\b/', $lines[1], $matches) ? end($matches) : null; $itemCount = 17; $scannedLines = array(); foreach ($lines as $line) { if (preg_match('/(.*?)\:\s(.*?)/', $line)) { $scannedLines[] = $line; } } $wlanInterfaces = array_chunk($scannedLines, $itemCount); foreach ($wlanInterfaces as $index => $wlanInterface) { $tempArray = array(); foreach ($wlanInterface as $line) { $matches = preg_match('/(.*?)(\s+)(\:)(\s)(.*)/', $line, $matches) ? $matches : null; $key = str_replace(array('-', ' ', '(', ')'), '', trim($matches[1])); $tempArray[$key] = end($matches); } $wlanInterfaces[$index] = $tempArray; } print_r($wlanInterfaces); } catch (Exception $exception) { echo $exception->getMessage() . PHP_EOL; }

+r10