<?
$dir = `ping dir.bg`;
echo "$dir";
?>
Резултатът от този скрипт е :
Pinging dir.bg [194.145.63.12] with 32 bytes of data: Reply from 194.145.63.12: bytes=32 time=7ms TTL=58 Reply from 194.145.63.12: bytes=32 time=19ms TTL=58 Reply from 194.145.63.12: bytes=32 time=9ms TTL=58 Reply from 194.145.63.12: bytes=32 time=8ms TTL=58 Ping statistics for 194.145.63.12: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 7ms, Maximum = 19ms, Average = 10ms
Някой може ли да ми каже как да го форматирам, така че да изглежда ето така:
Pinging dir.bg [194.145.63.12] with 32 bytes of data:
Reply from 194.145.63.12: bytes=32 time=7ms TTL=58
Reply from 194.145.63.12: bytes=32 time=19ms TTL=58
Reply from 194.145.63.12: bytes=32 time=9ms TTL=58
Reply from 194.145.63.12: bytes=32 time=8ms TTL=58
Ping statistics for 194.145.63.12: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds: Minimum = 7ms, Maximum = 19ms, Average = 10ms
Предварително благодаря...