开发者

PHP Socket: Simple TCP Proxy

开发者 https://www.devze.com 2023-03-17 00:53 出处:网络
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 individ

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号