Re: How to disable PHP's POST caching?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adam Zey wrote:
Tunelling arbitrary TCP packets. Similar idea to SSH port forwarding, except tunneling over HTTP instead of SSH. A good example might be encapsulating an IRC (or telnet, or pop3, or ssh, etc) connection inside of an HTTP connection such that incomming IRC traffic goes over a GET to the client, and outgoing IRC traffic goes over a POST request.

So, the traffic is bounced:

[mIRC] ---> [client.php] -----internet-----> [apache ---> server.php] -----internet-----> [irc server]

And the same in reverse. The connection between client.php and server.php is taking the IRC traffic and encapsulating it inside an HTTP connection, where it is unpacked by server.php before being sent on to the final destination. The idea is to get TCP tunneling working, once you do that you can rely on other programs to use that TCP tunnel for more complex things, like SOCKS.

You're trying to get a square peg through a round hole. The HTTP protocol was not designed to do anything like this, so the standard implementation by most web servers and PHP does not allow what you are trying to do.

I'm curious about your 'lots of POSTs' solution. How are you keeping the connection open on the server-side? It's certainly not possible to maintain that connection between requests without using a process outside the web server that maintains the connections. I've implemented a system in the past to proxy IRC, MSN and AIM connections in this way, but it only worked because the requests that came into PHP got passed to this other process which held all the connections and managed the traffic. And yes, it did generate a huge amount of traffic even when it wasn't doing anything due to the need to poll the server for new incoming messages.

This demonstrates a point at which you need to reconsider whether a shared hosting environment (which I assume you're using given the restrictions you've mentioned) is enough for your purposes. If you had a dedicated server you could add another IP and run a custom server on it that would be capable of doing exactly what you want. In fact there are lots of nice free proxies that will happily sit on port 80. However, it's worth nothing that a lot of firewalls block traffic that doesn't look like HTTP, in which case you'll need to use SSL on port 443 to get past those checks.

Anyways, long story (sorry) short, your square peg won't go in the round hole without serious modification. Hope that helps.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux