[PHP] POST without a form

2003-01-30 Thread arthur.chereau
Hi,

A PHP page (main.php) loads another page (doit.php) via a form. doit.php gets the data
via $_POST.

Now, from a third page (other.php), I need to load doit.php with other data, but
automatically, without a form.

How can I redirect to doit.php and send POST data at the same time ? (as if a form was
filled)

I tried the fsockopen method, described at e.g.
http://www.faqts.com/knowledge_base/view.phtml/aid/12039/fid/51, but it doesn't
redirect to a page, it just gets its output. It need something like header(Location:
doit.php) with POST data.

doit.php can't be modified. I can't use javascript.

What is the canonical way to do this in PHP ?

--

Faites un voeu et puis Voila ! www.voila.fr 



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




[PHP] Re:[PHP] POST without a form

2003-01-30 Thread Daniel Leighton
I think what you want to use is CURL.  I don't know if that's the canonical way to do 
it, but it is certainly a way.  You can get more info here:
http://www.php.net/manual/en/ref.curl.php

At 1:28 AM +0100 on 1/31/03, arthur.chereau wrote:


Hi,

A PHP page (main.php) loads another page (doit.php) via a form. doit.php gets the data
via $_POST.

Now, from a third page (other.php), I need to load doit.php with other data, but
automatically, without a form.

How can I redirect to doit.php and send POST data at the same time ? (as if a form was
filled)

I tried the fsockopen method, described at e.g.
http://www.faqts.com/knowledge_base/view.phtml/aid/12039/fid/51, but it doesn't
redirect to a page, it just gets its output. It need something like header(Location:
doit.php) with POST data.

doit.php can't be modified. I can't use javascript.

What is the canonical way to do this in PHP ?

--

Faites un voeu et puis Voila ! www.voila.fr



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


-- 

Daniel Leighton
Chief Technology Officer
Webolution
http://www.webolution.com

 This email may contain material that is confidential and privileged for the
sole use of the intended recipient.  Any review, reliance or distribution
by others or forwarding without express permission is strictly prohibited.
If you are not the intended recipient, please contact the sender and delete
all copies.

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