{"repo":"spatie/ping","free":true,"listed":false,"github":"https://github.com/spatie/ping","clone":"git clone https://github.com/spatie/ping.git","description":"Run an ICMP ping and get structured results","language":"PHP","stars":92,"topics":["monitoring","networking","ping"],"license":"MIT","category":"networking-infra","readme_excerpt":"🏓 Run an ICMP ping and get structured results This package provides a simple way to execute ICMP ping commands and parse the results into structured data. It wraps the system's ping command and returns detailed information about packet loss, response times, and connectivity status. Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installation You can install the package via Composer: Usage The simplest way to ping a host: Configuring ping options You can customize the ping behavior using constructor parameters: Or use the fluent interface: IPv4 and IPv6 support By default, pings use IPv4. You can change this using the ipVersion option: You can also set the IP version in the constructor: The IP version used is included in the result: Lost packet reporting The showLostPackets option enables the -O flag on Linux systems, which reports outstanding ICMP ECHO replies before sending the next packet. This is useful for diagnostic purposes and logging when investigating network connectivity issues: Output example With showLostPackets: true (default), the raw output will include notifications about missing replies: With showLostPackets: false , only successful replies ","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/ping/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}