@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;
	}