定制 ijortengab/browser 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ijortengab/browser

最新稳定版本:v0.0.9

Composer 安装命令:

composer require ijortengab/browser

包简介

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

README 文档

README

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

Requirement:

// 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;

统计信息

  • 总下载量: 45
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL
  • 更新时间: 2015-06-12