Hello.
I wonder if it's possible to make something like SOCKS5 or HTTP proxy with PHP.
A SOCKS is a IP:PORT which plays a proxy role and all the internet traffic will be passed through it.
Is it possible to make such a proxy with PHP, for example WEBSITE_IP:PORT which get the user request and returns something.
I know it may be possible to implemented by socket programming.
Proxy with PHP
Moderator: General Moderators
Re: Proxy with PHP
Any proxy that operates on the HTTP layer can be done with PHP. Make sure your web server will play nicely with the requests, then PHP will receive them as any other request and you can work with them however you want.
So a plain HTTP proxy you can do, but a SOCKS proxy not so much. You still can, of course, because PHP does sockets in general, you just can't write "normal" PHP code to implement it.
So a plain HTTP proxy you can do, but a SOCKS proxy not so much. You still can, of course, because PHP does sockets in general, you just can't write "normal" PHP code to implement it.