Phpcap was originally a light implementation of the libpcap which provides an acces to all the pcap functions, but it has been upgraded with a set of functions to break down, make and send custom network packets.
The module is divided in two extensions, Phpcap and PktTool, phpcap just implements the Pcap functions for sniffing while PktTool provides an access to several functions like pkttool_get_datalink() (which gets the datalink header from a packet), or pkttool_new_tcp() (which builds a new tcp header) and more...
You can monitor a specific action by sniffing with pcap function and then break down packets for analysis, or build a custom connection to a server, by coding your own packet sequence.