Hi guys, I'm playing with snoopy and am stuck on doing two calls in the same
script. The second call revisits a website after getting an existing link
based on the results of the first call ... If I hard code the URL, then
everything is fine. It's this line that goes wrong
"$newsnoopy->fetchtext($newurl);" ... If I put
$newsnoopy->fetchtext(http://result/of/first/call/); It's fine. Any help
appreciated....
error ... "BAD REQUESTYour client sent a request that this server didn't
understand.Request: "
<?php
include("Snoopy-1.2/Snoopy.class.php");
$snoopy = new Snoopy();
$url = "http://www.thefirsturl.com/?name=".$_GET['inputpc'];;
$snoopy->agent = "Mozilla/8.0";
$snoopy->fetchlinks($url);
$newurl = $snoopy->results[38];;
$newsnoopy = new Snoopy();
$newsnoopy->agent = "Mozilla/8.0";
$newsnoopy->fetchtext("http://www.thesecondurl.com/"); // this works
//$newsnoopy->fetchtext($newurl); // this doesn't
//$newsnoopy->fetchtext($snoopy->results[38]); // this doesn't
echo $newurl."<br>";
//echo $newsnoopy->results;
$exploded=explode(" ",$newsnoopy->results);
echo $exploded[42];
echo "<br>";
echo $exploded[51];
?>