in reply to Parsing Links from .php

When scraping a website with frames, you will need to retrieve each frame. Other than that, websites generated through PHP (or rather, with an URL that contains the string php) are no different than websites served with other strings in their URLs. WWW::Mechanize is your best bet there.

Replies are listed 'Best First'.
Re^2: Parsing Links from .php
by jdetloff (Acolyte) on Jan 11, 2010 at 02:00 UTC

    Thanks for the reply!

    Can you be a bit more specific about what you mean when you say "retrieve each frame"? WWW::Mechanize can return them as links, which take me to their source, but if I do this I lose the other frames.

    Is there a way to deal with each of them without navigating away from the others? In the situation I'm working with the links in one frame effect what is displayed in another frame. I need to navigate with one frame, and still be able to read data or follow further links in the other.

      There is no way to retrieve the content of each frame other than navigating to it. If you want to keep multiple frames "open" at the same time, just ->clone your WWW::Mechanize object(s) and navigate the clones to the respective frames. Also, you can visit a frame and then go ->back() to return to the page linking to the frame.

        Thanks, that method worked out just great for me. I was able to navigate to the file I needed and download it. Thanks again!