I use symfony/panther for web crawling. To access the page I want, I need to be authenticated and I don't know how to do it.
I have tried :
$client = Client::createChromeClient();
$client->start();
$crawler = $client->request('GET', 'http://website.com/login.php');
$form = $crawler->selectButton('Submit!')->form([
'email' => myEmail,
'pwd' => myPassword
]);
$client->submit($form);
But it doesn't work, my user isn't authenticated.
I think I need to retrieve a cookie and add it to my client but I don't know how to do it. Can someone please give me the steps to do this?