I'd like to redirect visitors to a remote location sending post values.
Using:
=============== =============== =============== =============== ====
$ch = curl_init();
curl_setopt($ch , CURLOPT_URL,
"http://www.ihk-bonn.de/handelsregister/");
curl_setopt($ch , CURLOPT_POST, 1);
curl_setopt($ch , CURLOPT_POSTFIE LDS,
"amtsgericht=&d ateYear=2004&mo nthsNr=®iste rart=".
"&cursorStepVal ue=5&orderby=Ha ndelsregister-Nr.".
"&suchword=kast enholz&s=1&sear ch=www.ihk-bonn.de");
curl_exec($ch);
=============== =============== =============== =============== ====
I can retrieve www.ihk-bonn.de's response and print it to the browser, (see
www.peterkastenholz.de/test.php) but what I want is to redirect to
"www.ihk-bonn.de/handelsregister/" with my POST values and the corresponding
result.
I couldn't find code to do this on
www.php.net/manual/en/function.curl-exec.php or curl.haxx.se etc.
Using fsockopen/fputs directly didn't help - same result. Output
buffering prevented the result from being printed to the browser, but I
couldn't fiddle a redirection.
Any clues?
Marek
bn548mm@g214mx. net
(remove numbers to despam)
Using:
=============== =============== =============== =============== ====
$ch = curl_init();
curl_setopt($ch , CURLOPT_URL,
"http://www.ihk-bonn.de/handelsregister/");
curl_setopt($ch , CURLOPT_POST, 1);
curl_setopt($ch , CURLOPT_POSTFIE LDS,
"amtsgericht=&d ateYear=2004&mo nthsNr=®iste rart=".
"&cursorStepVal ue=5&orderby=Ha ndelsregister-Nr.".
"&suchword=kast enholz&s=1&sear ch=www.ihk-bonn.de");
curl_exec($ch);
=============== =============== =============== =============== ====
I can retrieve www.ihk-bonn.de's response and print it to the browser, (see
www.peterkastenholz.de/test.php) but what I want is to redirect to
"www.ihk-bonn.de/handelsregister/" with my POST values and the corresponding
result.
I couldn't find code to do this on
www.php.net/manual/en/function.curl-exec.php or curl.haxx.se etc.
Using fsockopen/fputs directly didn't help - same result. Output
buffering prevented the result from being printed to the browser, but I
couldn't fiddle a redirection.
Any clues?
Marek
bn548mm@g214mx. net
(remove numbers to despam)
Comment