denis-kisel / laravel-phantomjs-curl
用于获取难以访问网站内容的 phantomjsCURL
v1.0
2019-10-12 13:05 UTC
Requires
- php: >=7.2
- illuminate/support: >=5.0
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-09-23 03:27:08 UTC
README
关于使用 phantomjs 获取难以访问网站内容的简介。
更强大的库
这是用于简单使用的第一个版本,如果您需要全部功能,请参阅以下源代码:CasperCURL
安装
通过 composer 安装
composer require denis-kisel/phantom-curl
发布配置文件
php artisan vendor:publish --provider="DenisKisel\PhantomCURL\ServiceProvider" --tag="config"
如果需要更改存储目录或替换 phantomjs 的 bin 文件,请更改配置 phantom_curl
使用方法
//Return content page \DenisKisel\PhantomCURL\PhantomCURL::to('https://amazon.com')->get() //Use Proxy //$method available - [http|socks5|none] (default is http) \DenisKisel\PhantomCURL\PhantomCURL::to('https://google.com') ->withProxy($ip, $port, $method, $login, $pass) ->get(); //Change window size (default is 1024x768) \DenisKisel\PhantomCURL\PhantomCURL::to('https://google.com')->windowSize(1920, 1080)->get();