怎麼得到 PING 反回的的值

來源:互聯網
上載者:User
如何得到 PING 反回的的值
如何得到 PING 反回的的值

檔案 1.txt 內容是PING內容
Pinging www.qq.com [14.17.32.211] with 32 bytes of data:
Reply from 14.17.32.211: bytes=32 time=20ms TTL=53
Reply from 14.17.32.211: bytes=32 time=13ms TTL=53
Reply from 14.17.32.211: bytes=32 time=13ms TTL=53
Reply from 14.17.32.211: bytes=32 time=13ms TTL=53
Reply from 14.17.32.211: bytes=32 time=13ms TTL=53
Reply from 14.17.32.211: bytes=32 time=13ms TTL=53
Reply from 14.17.32.211: bytes=32 time=13ms TTL=53
Reply from 14.17.32.211: bytes=32 time=12ms TTL=53
Reply from 14.17.32.211: bytes=32 time=13ms TTL=53
Reply from 14.17.32.211: bytes=32 time=12ms TTL=53
Ping statistics for 14.17.32.211:
Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 12ms, Maximum = 20ms, Average = 13ms

要用什麼代碼,得到 Pinging (*值)[*值] with 32 bytes of data: (想得到 www.qq.com和14.17.32.211 )
最後再得到
Sent =*值
Received =*值
Lost =*值
Minimum =*值
Maximum =*值
Average = *值 PING

分享到:


------解決方案--------------------
噢,漏了 IP
preg_match_all('/(Pinging 
------解決方案--------------------
for
------解決方案--------------------
(\w+) = )([\w.]+)/s', $s, $r);
print_r($r);
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.