Jump to content


Photo

snapshot of web page


  • Please log in to reply
2 replies to this topic

#1 summericeweb

summericeweb
  • New Members
  • Pip
  • Newbie
  • 6 posts
  • LocationBurlington

Posted 05 April 2006 - 03:40 PM

Do anyone know how to take a "snapshot of web page" with PHP or Perl?
[a href="http://www.summericeweb.com/" target="_blank"]http://www.summericeweb.com/[/a] - the future of the web.

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 05 April 2006 - 03:46 PM

Php and Perl both run on the server not the client.

#3 vinson_isap

vinson_isap
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 05 April 2006 - 04:46 PM

Hello,

I am not sure, but this small routine can capture an un-secured site and convert it to a string.


<?PHP
if(!function_exists("file_get_contents"))
{
function file_get_contents($filename)
{
if(($contents = file($filename)))
{
$contents = implode('', $contents);
return $contents;
}
else
return false;
}
}

$origin2 = 'http://nl2.php.net/file_get_contents';

$siteval = file_get_contents($origin2);

echo '<br><br>';
echo $siteval;
echo '<br>';

?>




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users