• Resolved yayakov

    (@yayakov)


    Hello,
    I’d like to use remote_get to parse text in specific <dir>s of some website and show it on mine. But the problem is all <dir>s on source-website have same class witch results in parsing only first one and ignoring all others. I can’t parse the whole page with all blocks because <dir>s I need are inside of other blocks with irrelevant information.
    Structure is as follows:

    <dir>
    irrelevant text
      <dir id="same">relevant text</dir>
      <dir>irrelevant text</dir>
    </dir>
    <dir>
    etc

    Question is: can I loop my remote_get so it will show all <dir id="same"> all one by one?

    https://wordpress.org/plugins/shortcurl/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eli

    (@scheeeli)

    If you loop the remote_get call it will just keep finding the first one, but if you return the whole page then you can use another method (like preg_replace) to parse all divs matching that id.

    Okay, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Looped remote_get’ is closed to new replies.