login() public method

Login, and get the cookie jar.
public login ( )
Example #1
0
 * This is a test file.
 * 
 * @author    Ning Luo <*****@*****.**>
 * @copyright This code is copyright to me.
 * @license   MIT
 * @package   lndj/Lcrawl
 */
require 'vendor/autoload.php';
use Lndj\Lcrawl;
//stu_id
$stu_id = '201404739';
//your password
$password = '******';
$user = ['stu_id' => $stu_id, 'stu_pwd' => $password];
$client = new Lcrawl('http://xuanke.lzjtu.edu.cn/', $user, false);
$client->login();
$all = $client->setUa('Lcrawl Spider V2.0.2')->getGrade();
//setTimeOut()
//setReferer
//set...
dd($all);
// dd($client->login());
// $client->getSchedule();
// $client->getCet();
//Set the login post param
/*
[
    'viewstate' => '__VIEWSTATE',
    'stu_id' => 'TextBox1',
    'passwod' => 'TextBox2',
    'role' => 'RadioButtonList1',