PHP Snoopy 2.0 Not Retrieving Content

Discussion in 'Programming/Scripts' started by Gregory S Tibbetts, Aug 15, 2018.

  1. I am using snoopy to retrieve the content of a web site and it is not working.
    Here is a break down of what I am doing.
    1. Retrieving the url's on a specified page.
    2. Retrieving the content of those pages.

    Here is my code so far. It should be giving me a list of url's but the out put is empty. It seems to be retrieving nothing.

    include "include/Snoopy.class.php";
    $snoopy = new Snoopy;

    // remote url
    $url = "";

    // create an array of url's for categories
    $cat = array("rc-toys/drones", "r-c-drones/small-size", "rc-toys/drones/medium/", "r-c-drones/large-size-drones", "r-c-drones/drones-with-camera",
    "rc-toys/drones/fpv-camera/", "rc-toys/drones/wifi-camera/", "rc-toys/helicopters", "rc-toys/vehicles", "rc-toys/tanks", "general-toys/");

    foreach ($cat as $value) {
    if($snoopy->fetchlinks($url . "/" . $value)){
    echo "<PRE>".htmlspecialchars($snoopy->results)."</PRE>\n";
    echo "error fetching document: ".$snoopy->error."\n";
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    There is a pop-up window on those category pages. Does that prevent the result?
  3. I am not sure. Although I can retrieve the page with curl. Is there a way to block the pop up?

Share This Page