So I'm trying to use Goutte to login to an https website but I get the following error:
cURL error 60: SSL certificate problem: unable to get local issuer certificate
500 Internal Server Error - RequestException
1 linked Exception: RingException
And this is the code that the creator of Goutte says to use:
use Goutte\Client;
$client = new Client();
$crawler = $client->request('GET', 'http://github.com/');
$crawler = $client->click($crawler->selectLink('Sign in')->link());
$form = $crawler->selectButton('Sign in')->form();
$crawler = $client->submit($form, array('login' => 'fabpot', 'password' => 'xxxxxx'));
$crawler->filter('.flash-error')->each(function ($node) {
print $node->text()."\n";
});
OR here's come code that Symfony recommends:
use Goutte\Client;
// make a real request to an external site
$client = new Client();
$crawler = $client->request('GET', 'https://github.com/login');
// select the form and fill in some values
$form = $crawler->selectButton('Log in')->form();
$form['login'] = 'symfonyfan';
$form['password'] = 'anypass';
// submit that form
$crawler = $client->submit($form);
The thing is that neither of them work, I get the error that I posted above. I CAN, however log in using the code written in this past question I've asked: cURL Scrape then Parse/Find Specific Content
I just want to use Symfony/Goutte to login in, so that scraping the data I need will be easier. Any help or suggestions please? Thanks!