The Easy Socket library supplies some functions to bind and connect sockets, and to read and write variables of all simple types and strings. It's written in C, but there is also an interface for PHP3.
Information regarding Project Releases and Project Resources. Note that the information here is a quote from Freecode.com page, and the downloads themselves may not be hosted on OSDN.