Forum Moderators: coopster & phranque

Message Too Old, No Replies

Problem when getting iframe contents

         

tntpower

11:36 pm on Dec 5, 2004 (gmt 0)

10+ Year Member



An iframe is embedded in web pages. This iframe is called by JS/php code. When right-click the iframe, you can view the real URL of the iframe.

The problem is that, there is a variable is the iframe URL. For example, [remoteurl?random=12345....] This var (random) does not repeat in any 3 days. So, although it is not hard to get the source URL of the iframe, you cannot simply use LWP to get the contents of the destination page. (since the random ID you use in your LWP agent tried to visit a repeated random ID, which is not allowed).

Any suggestion? Thanks!

tntpower

11:48 pm on Dec 5, 2004 (gmt 0)

10+ Year Member



For example, the destination URL of the iframe is [remote-url?random=12345....] You get this URL and try to visit it again, it fails and you get error like the page you are visiting has expired. (You cannot get the random ID until the iframe is fully loaded)

VectorJ

1:20 am on Dec 6, 2004 (gmt 0)

10+ Year Member



You could try using WWW::Mechanize to load the parent page, then grab the contents of the iframe.