phpsniffer shows that PHP really is the right tool for every programmnig task imaginable (humor, laugh), I submit for your amusement, phpsniffer.
phpsniffer is a packet sniffer written entirely in PHP without any PECL/PEAR extensions. (It is recommended that you check out Phpcap for any serious sniffing at http://alcane.newffr.com/phpcap/).
phpsniffer has some limitations:
- You probably will only see one side of a conversation.
- You might miss packets with a short TTL.
- Currently only IP,ICMP,UDP, and TCP headers are decoded.
- Sockets must be enable in your PHP build.
- PHP 4.3.0 or greater with sockets enabled