cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: FRAMES pages does not load

From: Dave Withnall <withnall_at_connexus.net.au>
Date: Tue, 06 May 2003 20:30:19 +1000

If you want to get a framed site you need to mimic the way a browser works.
First it downloads the index.asp file. which contains the frameset.
then the browser parses the file and goes and grabs the files listed in the
frameset.

to get the frames you will probably need to use cookies as the index file
will initialise the session cookie. a lot of servers will require you to
have a valid session cookie, otherwise they redirect you to the index file.

Read up the curl documentation on how to use cookies. The curl php site
contains examples on how to use cookies.
http://curl.haxx.se/libcurl/php/

you might want to get yourself a bit of software that will watch network
traffic and show you whats happening at each stage of your browsing. This
will show you how browsers work and also how you need to set up your
scripts to connect to the sites you're after.

D.

At 09:39 AM 6/05/2003 +0000, imran khalid wrote:
>Dear Friends,
>
>I am getting data from another site by using CURL and PHP on my server.
>The page i request get form data and process it. after processing it
>redirect the page that is in the form of FRAMES.
>But i only get he index page text that called these frames inside it.
>
>
>--------------------------------
><FRAMESET border=1 frameSpacing=0 rows='44,*' frameBorder=0
>marginheight="1" marginwidth="1">
><FRAME name=title marginWidth=0 marginHeight=0
>src="https://wwww.dd.com/comcnet.asp" noResize scrolling=no>
><FRAME name=results marginWidth=0
>marginHeight=0src="https://wwww.dd.com/cnet_product_results.asp" noResize>
></FRAMESET>
>---------------------------------
>
>if i use the redirect property curl_setopt($ch, CURLOPT_FOLLOWLOCATION,
>1); then nothing appers in the frames only index page shows two frames
>with text "Page not found".
>
>
>I think the pages https://wwww.dd.com/comcnet.asp &
>https://wwww.dd.com/cnet_product_results.asp are called from browser not
>from curl fucntion that;s why they fail to load in the web browser.
>
>
>I have also try by sening second request $ch2 = curl_init(); to the page
>https://wwww.dd.com/comcnet.asp and third request to the next page but
>this does not shows any result. i think the index.asp page that contain
>these pages call these two pages with some headers. Please let me know
>that how can i get the headers value from first $ch = curl_init();
>and can pass it to second $ch2 = curl_init();
>
>
>Regards,
>Imran Khalid
>imranlink_at_hotmail.com
>wazirabad_at_yahoo.com
>
>_________________________________________________________________
>Add photos to your messages with MSN 8. Get 2 months FREE*.
>http://join.msn.com/?page=features/featuredemail
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-05-06