2017 © Pedro Peláez
 

library browser

Turn browser software to PHP Object. A simple HTTP request/response that implements PSR-7.

image

ijortengab/browser

Turn browser software to PHP Object. A simple HTTP request/response that implements PSR-7.

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Browser, PHP HTTP Client

HTTP Requester like a browser, automatically save and load cookie, follow location, and save the history and cache., (*1)

Requirement: - PHP > 5.4.0 - [IjorTengab Tools][1] > 0.0.1, (*2)

// Simple request.
$browser = Browser::profile('Mozilla Firefox on Windows 7');
$browser->setUrl('http://httpbin.org/html')->execute();
$html = (string) $browser->result;
// Post request, login, and enter to authenticated page.
$browser = Browser::profile('Mobile');
$browser->setUrl('http://httpbin.org/post');
$browser->post([
    'username' => 'IwanFals',
    'password' => 'SoreTuguPancoran',
]);
$browser->headers('Referer', 'http://httpbin.org/');
$browser->options('timeout', 5);
$browser->execute();
// Cookie automatically saved.
$browser->reset()->setUrl('http://httpbin.org/member-area-only')->execute();
// Cookie automatically loaded, and with session information in cookie
// you can enter page which is for authenticated only.
$code = $browser->result->code; // 200 OK.
$html = $browser->result->data;

The Versions

12/02 2016

dev-psr7

dev-psr7

Turn browser software to PHP Object. A simple HTTP request/response that implements PSR-7.

  Sources   Download

GPL

The Requires

 

07/02 2016

dev-master

9999999-dev

HTTP Requester like a browser, automatically save and load cookie, follow location, and save the history and cache.

  Sources   Download

GPL

The Requires

 

17/01 2016

v0.0.9

0.0.9.0

HTTP Requester like a browser, automatically save and load cookie, follow location, and save the history and cache.

  Sources   Download

GPL

The Requires

 

16/01 2016

v0.0.8

0.0.8.0

HTTP Requester like a browser, automatically save and load cookie, follow location, and save the history and cache.

  Sources   Download

GPL

The Requires

 

13/12 2015

v0.0.7

0.0.7.0

HTTP Requester like a browser, automatically save and load cookie, follow location, and save the history and cache.

  Sources   Download

GPL

The Requires

 

17/11 2015

v0.0.6

0.0.6.0

HTTP Requester like a browser, automatically save cookie, follow location, and save the history and cache.

  Sources   Download

GPL

The Requires

 

16/11 2015

v0.0.5

0.0.5.0

HTTP Requester like a browser, automatically save cookie, follow location, and save the history and cache.

  Sources   Download

GPL

The Requires

 

16/11 2015

v0.0.4

0.0.4.0

HTTP Requester like a browser, automatically save cookie, follow location, and save the history and cache.

  Sources   Download

GPL

The Requires

 

16/11 2015

v0.0.3

0.0.3.0

HTTP Requester like a browser, automatically save cookie, follow location, and save the history and cache.

  Sources   Download

GPL

The Requires

 

16/11 2015

v0.0.2

0.0.2.0

HTTP Requester like a browser, automatically save cookie, follow location, and save the history and cache.

  Sources   Download

GPL

The Requires

 

16/11 2015

v0.0.1

0.0.1.0

HTTP Requester like a browser, automatically save cookie, follow location, and save the history and cache.

  Sources   Download

GPL