WorK
WorK

Reputation: 47

PHP Socket: Simple TCP Proxy

My goal is to make a simple TCP proxy application for my test lab. I want to modify some JSON data on the fly. I successfully managed to work a TCP client, and a TCP server, but individually, not at once.

Basically I want a PHP with 2 sockets, one for incoming clients, one for outgoing to server, and forward data to each other.

Upvotes: 4

Views: 4944

Answers (1)

Drazisil
Drazisil

Reputation: 3343

Try Socket Programming With PHP and An Introduction to Sockets in PHP.

Both of those look like very good tutorials, in fact the first one appears to both recieve and send data.

EDIT: added Writing Socket Servers in PHP as that was the link that helped the OP.

Upvotes: 3

Related Questions