Skip to content

Instantly share code, notes, and snippets.

@jhonnrodr
Created January 4, 2015 00:30
Show Gist options
  • Save jhonnrodr/7fe886e8a379ad8381b9 to your computer and use it in GitHub Desktop.
Save jhonnrodr/7fe886e8a379ad8381b9 to your computer and use it in GitHub Desktop.
public function index()
{
$client = new Client();
// Login page
$crawler = $client->request('GET', 'https://email.linc.do/iredadmin/login');
$form = $crawler->selectButton('Login')->form();
$crawler = $client->submit($form, array('username' => 'postmaster@linc.do', 'password' => 'musica'));
$crawler = $client->click($crawler->selectLink('Preferences')->link());
$crawler = $client->click($crawler->selectLink('Users')->link());
$crawler = $client->click($crawler->selectLink('User')->link());
$form = $crawler->selectButton('Add')->form();
$crawler = $client->submit($form, array(
'username' => 'craw',
'newpw' => '593musica',
'confirmpw' => '593musica',
'cn' => 'craw',
'mailQuota' => '100'
));
dd($crawler->html());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment