Re: http request using fsockopen
From: Manuel Lemos (mlemos_at_acm.org)
Date: 10/25/04
- Next message: Andy Barfield: "Re: Novice needs help???"
- Previous message: Chris Hope: "Re: [SQL] Select query - Someone put me out of my misery please"
- In reply to: Rob: "http request using fsockopen"
- Next in thread: Colin McKinnon: "Re: http request using fsockopen"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 25 Oct 2004 16:44:41 -0300
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
- Next message: Andy Barfield: "Re: Novice needs help???"
- Previous message: Chris Hope: "Re: [SQL] Select query - Someone put me out of my misery please"
- In reply to: Rob: "http request using fsockopen"
- Next in thread: Colin McKinnon: "Re: http request using fsockopen"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|