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_POSTFIELDS,
"amtsgericht=&dateYear=2004&monthsNr=®isterart= ".
"&cursorStepValue=5&orderby=Handelsregister-Nr.".
"&suchword=kastenholz&s=1&search=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
bn*****@g214mx.net
(remove numbers to despam)