Hello,
On 10/25/2004 09:46 AM, Rob wrote:
I have a form on page A which is submitted trough a POST method to page B.
On the start of page B I check var $foo. If true I want to "forward" the request to
page C. Sending the POST data also though the POST method.
I manually create a HTTP request to page C and use the fsockopen method to sent the request.
As a result I get the requested page C (status code "200 OK" is returned) but the
POST data is not received/parsed(?). I mean the $_POST array is empty in page C. All other PHP scripts in page C is executed as expected though.
My questions: 1 Is what I am doing possible in the first place?
Sure.
2 If so, what is the correct syntax to sent the POST data ($query) in the entity body of the request?
It is hard to tell but you may not be sending the request data correctly.
You may want to try this HTTP client class that you can be sure that it can compose and send your POST requests properly.
http://www.phpclasses.org/httpclient
--
Regards, Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php