Skip to content

An extension of the Snoopy PHP. Snoopy is a PHP class that simulates a web browser. It automates the task of retrieving web page content and posting forms, for example.

License

Notifications You must be signed in to change notification settings

rdjenkins/snoopyplus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

snoopyplus

An extension of the Snoopy PHP class. "Snoopy is a PHP class that simulates a web browser. It automates the task of retrieving web page content and posting forms, for example."

Snoopy PHP class is available from SourceForge https://sourceforge.net/projects/snoopy/

It is no longer maintained and this wrapper class seeks to extend it.

Added features:

  • Better handling of gzip encoding
  • Local storage of downloaded content ... store() and is_stored() methods
  • Better relative to absolute URL conversion

Example code:

<?php
include_once "snoopy/Snoopy.class.php";
include_once "class_Snoopyplus.php";

$snoopyplus  = new Snoopyplus;
if($snoopyplus->fetch2("http://t.co/X8sVIJg3zP")){
		if ($snoopyplus->lastredirectaddr) {
			print "<h1>$snoopyplus->lastredirectaddr</h1>";
		}
		print "<pre>".htmlspecialchars($snoopyplus->results)."</pre>";
?>

About

An extension of the Snoopy PHP. Snoopy is a PHP class that simulates a web browser. It automates the task of retrieving web page content and posting forms, for example.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages