Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Problem with cURL, redirection and frame.
Old 11-11-2010, 05:40 AM Problem with cURL, redirection and frame.
Junior Talker

Posts: 1
Trades: 0
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($cUrlCURLOPT_URL,’[url]http://address.com?search=whatever’);[/url]
curl_setopt($cUrlCURLOPT_RETURNTRANSFER1);
curl_setopt($cUrlCURLOPT_FOLLOWLOCATION1);
$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..
blizzardofozz is offline
Reply With Quote
View Public Profile Visit blizzardofozz's homepage!
 
 
Register now for full access!
Old 11-12-2010, 11:32 PM Re: Problem with cURL, redirection and frame.
Backslider's Avatar
Experienced Talker

Posts: 40
Trades: 0
I'd say they've been smart and do this to stop you using their resources and search
Backslider is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Problem with cURL, redirection and frame.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11730 seconds with 12 queries