[PHP] PHP HTTP Forwarding / Port Translation

2002-11-12 Thread Mike MacDonald
Hi People ! (Diagram below in text)
I'm interested in thoughts on how to effect the equivalent of Router 
Network Address Translation for a PHP page.

The feature that are important are:
 o Can process forms
 o Can pass images
 o Can manage relative HREFs
 o Least invasive to the end user

I've tried PHP Proxy and it works fine for basic pages but Scott 
thinks that it needs work to do forms.

Along with this I'm just wondering if we can intercept the header at a 
low
level and just simply rewrite the port  -- or is this dumb thinking?

I'd be very grateful for any thoughts or references. 

There's a piccie of what I have in mind below -- needs monospaced fonts
before it will make any sense

Thanks in advance
Mike

   Please view in a fixed-width font such as Courier.


   ++
   ||
   | PHP Referrer   |
   | (Proxy)|
   ||
 80| Passes distant |
  Firewall  /  | pages back to  |
+-+/   | requestor  |
|-|   /||
|-|  / | Passes form|
|-| /  | processes forward
|-|/   ++
 --Normal  HTTP Ports /   |
|-|   |
|-|  ++ Distant URL
|-|  |
|-|  |http://distant.com/Dir
|-|  |   +---+
|-|  |   |Target Page|
+-+  |   |Images / forms |
 |   |   |
 +-3000--   |
 |   |
 |   |
 |   |
 |   |
 |  +|
 |  |  /
 |  | /
 +--+/

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




Re: [PHP] PHP HTTP Forwarding / Port Translation

2002-11-12 Thread Ernest E Vogelsinger
At 23:00 12.11.2002, Mike MacDonald said:
[snip]
Hi People ! (Diagram below in text)

Hi! I like your graphics, esp. the folded corner ;-)

I'm interested in thoughts on how to effect the equivalent of Router 
Network Address Translation for a PHP page.

The feature that are important are:
 o Can process forms
 o Can pass images
 o Can manage relative HREFs
 o Least invasive to the end user

I've tried PHP Proxy and it works fine for basic pages but Scott 
thinks that it needs work to do forms.

Along with this I'm just wondering if we can intercept the header at a 
low
level and just simply rewrite the port  -- or is this dumb thinking?

I'd either go with a _real_ NAT on the proxy host, or, if I must use PHP
for whatever reason (which will be slower than a kaernel-based NAT) I'd
think of using CUrl to transparently handle post data as well as URI-based
queries.

One last word - I hope the forms you are targetting remotely are your
own... handling foreign forms and web pages could be interpreted as
stealing; one might easily get into a copyright violation.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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