Can 2 different snoopy->fetch work on 1 page

Help
Tasohr
2007-10-11
2013-05-30
  • Tasohr
    Tasohr
    2007-10-11

    I have a problem.
    I want on my main page to show updated weather forcast (from one source) and city temperatures (from another link). The problem is that it works with only one of them - the second time when I include the second script(that also uses snoopy.class) it looks like the page script has halted.
    What shoud I do? Can 2 or more snoopy.class results be shown in one page?

     
    • sharp
      sharp
      2007-10-12

      anything is possible.

      1) Try to grab data from first site with snoopy (in a php file)
      2) Try to grab data from second site with snoopy (in a different php file)

      If above work, then you should have no problem in putting them together. Drop code in here so I can tell you were you went wrong. Cheers.

       
      • Tasohr
        Tasohr
        2007-10-12

        I am doing that. Here is a simple version of the page:

        <?php
        include "uzimanje/averz.php";

        echo "<br>";   
        echo "<br>";

        include "uzimanje/bverz.php";
        ?>

        The first script uses snoopy to extract data from one page, and the other one uses snoopy on a different page.
        The first one works only, and if i remove the first "include" then the other one works normaly.
        I even tryed to make snoopy.class2 so that the other script can use it - same result :(.
        I use snoopy version: 1.01.

         
        • sharp
          sharp
          2007-10-14

          :) only explanation is that you have an error in your first include which crushes/terminates php execution and it never reaches the second include ... did you checked for die() calls? are you sure that execution reaches second include? (put an echo at start of second include) --> this is if you really tested both includes separately (which you said you did).