PHP Classes

Browser: Retrieve Web pages emulating a browser

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 54%Total: 2,443 All time: 1,590 This week: 71Up
Version License PHP version Categories
browser 1.0Freely Distributable5.0HTML, HTTP, Testing
Description 

Author

This class can be used to retrieve Web pages emulating a browser.

It can retrieve a given page, parse it and proceed retrieving the pages or content that would result of clicking on given links or submitting forms in the initial page.

The class provides functions to locate the links to click or form to submit either specifying a Xpath expression or searching page elements by attribute.

Innovation Award
PHP Programming Innovation award nominee
June 2009
Number 3


Prize: One book of choice by Manning
Sometimes you need to emulate the access of an user to a site, either for retrieving information, or for testing if a site is working properly.

This class makes it easy to build scripts that emulate the access of users to a sequence of pages, by clicking on links and submitting forms.

Manuel Lemos
Picture of Jon Gjengset
Name: Jon Gjengset is available for providing paid consulting. Contact Jon Gjengset .
Classes: 10 packages by
Country: Norway Norway
Age: 35
All time rank: 2301 in Norway Norway
Week rank: 132 Up1 in Norway Norway Equal
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files (4)  
File Role Description
Plain text file browser.class.php Class The class sources
Accessible without login Plain text file browser.example.php Example An example of how the script can be used
Plain text file curl_http_client.php Class Curl_HTTP_Client slightly modified to allow cURL to follow redirects
Plain text file remoteform.class.php Class RemoteForm class for submitting forms. Also exists as a separate project on PHPClasses

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
Downloadbrowser-2012-06-20.zip 10KB
Downloadbrowser-2012-06-20.tar.gz 9KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
Remote Form Download .zip .tar.gz Used for handling forms submission Recommended
 Version Control Unique User Downloads Download Rankings  
 0%
Total:2,443
This week:0
All time:1,590
This week:71Up
 User Ratings  
 
 All time
Utility:79%StarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:70%StarStarStarStar
Tests:-
Videos:-
Overall:54%StarStarStar
Rank:2028