help me please

Help
srinivas
2007-03-02
2013-05-30
  • srinivas

    srinivas - 2007-03-02

    i am not getting the snoopy to work i am getting the error
    Warning: main(snoopy.class.php): failed to open stream: No such file or directory in /home/ratesnow/public_html/dity/fetcher.php on line 5

    Warning: main(snoopy.class.php): failed to open stream: No such file or directory in /home/ratesnow/public_html/dity/fetcher.php on line 5

    Warning: main(): Failed opening 'snoopy.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ratesnow/public_html/dity/fetcher.php on line 5

    Fatal error: Cannot instantiate non-existent class: snoopy in /home/ratesnow/public_html/dity/fetcher.php on line 6

    what wrong i did can anyone please help me

     
    • sharp

      sharp - 2007-03-02

      could you please post the code for which you get those errors? ... i believe that you try to use snoopy either without importing the class, either without having the class in the place you specified.

       
    • srinivas

      srinivas - 2007-03-02

      <?php

      set_time_limit(0);

      include( 'snoopy.class.php' );
      $snoopy = new Snoopy;

      /* CHANGE! */
      $snoopy->agent = "User-Agent=any name";

      for( $i = 0; $i < 99; $i++ ) {
              if( $snoopy->fetch( 'http://www.google.de/search?q=inurl:web-log.nl/log/+Reacties&lr=&start='.$i.'0&sa=N&filter=0' ) ) {
                      preg_match_all( '/<font color=#008000>(.*?)\.web-log\.nl\/log\/(.*?) - /', $snoopy->results, $o, PREG_SET_ORDER );
                      echo 'Page '.( $i + 1 ).":<br />\n";
                      foreach( $o as $u ) {
                              /* as key to overwrite the same existing url to avoid duplicates ;) */
                              $urls['http://'.$u[1].'.web-log.nl/log/'.$u[2]]++;
                              echo 'http://'.$u[1].'.web-log.nl/log/'.$u[2]."<br />\n";
                      }
                      sleep( 2 );
              }
      }

      $lines = '';
      foreach( $urls as $url => $count ) {
              $lines .= $url."\n";
      }

      if( $fp = fopen( 'weblog_id_list.txt', 'w+' ) ) {
              fwrite( $fp, $lines );
      }
      fclose( $fp );

      ?>

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks