PHP goutte截图

时间:2016-07-12 02:57:16

标签: php web-crawler screenshot goutte

我有一个PHP goutte脚本,它从网页提交了几个表单,但我接下来要做的就是抓取页面的截图,并将其保存在文件夹中。

<?php

require_once __DIR__.'/vendor/autoload.php';

use Goutte\Client;
use Symfony\Component\DomCrawler\Crawler;


$client = new Client();

$crawler = $client->request('GET', 'https://login.siat.sat.gob.mx/nidp/idff/sso?id=mat-ptsc-totp&sid=10&option=credential&sid=10');

$form = $crawler->selectButton('Enviar')->form();

$crawler = $client->submit($form, array('Ecom_User_ID' => 'xxx', 'Ecom_Password' => 'xxx'));

$crawler = $client->request('GET', 'https://www.siat.sat.gob.mx/PTSC/');

echo $crawler->html();

有什么想法吗?

0 个答案:

没有答案