Hi!
I need someone ho has used the Snoopy class
( http://sourceforge.net/projects/snoopy/ )
for fetching the text from pages to hlep me with one problem. The problem is that when I use that code:

<?
$f = "";
$m = "http://examplepage.com";
include "Snoopy.class.php";
	$snoopy = new Snoopy;

$snoopy->agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
$snoopy->referer = "http://www.microsnot.com/";

$snoopy->cookies["SessionID"] = 238472834723489;
$snoopy->cookies["favoriteColor"] = "RED";

$snoopy->rawheaders["Pragma"] = "no-cache";

$snoopy->maxredirs = 2;
$snoopy->offsiteok = false;
$snoopy->expandlinks = false;

if($snoopy->fetchtext($m))
	{
		while(list($key,$val) = each($snoopy->headers))

	$f .= $snoopy->results;
}
echo $f;
?>

I get only the text from the page http://google.bg Do you know how can I get the whole intact HTML code with all its tags as it appears for real in the web browser?
Please, help! 😕

    Write a Reply...