Created
January 4, 2015 00:30
-
-
Save jhonnrodr/7fe886e8a379ad8381b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' => '[email protected]', '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