Hello guys,
I have this problem – I want to receive results from external database search using cURL. The form action of the external page leads to .cgi file using POST method. Then redirect happens to a page on other server (HTTP/1.1 302 Moved Temporarily), which I can follow (CURLOPT_FOLLOWLOCATION) but the problem is that the new location page is created using frameset and I cannot follow frame src to receive desired data, which is displayed into one of the frames.
If I use GET method:
PHP Code:
$cUrl = curl_init(); curl_setopt($cUrl, CURLOPT_URL,’[url]http://address.com?search=whatever’);[/url] curl_setopt($cUrl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($cUrl, CURLOPT_FOLLOWLOCATION, 1); $pageContent = trim(curl_exec($cUrl)); curl_close($cUrl); echo $pageContent;
then I receive desired page but with no info in it since no POST to form action script was sent.
I’m stuck on this for couple of days and I really hope someone to help me on this.
Last edited by chrishirst; 11-11-2010 at 08:05 PM..
|