PHP code example of megoc / ecjtu-crawler

1. Go to this page and download the library: Download megoc/ecjtu-crawler library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

megoc / ecjtu-crawler example snippets


// 所有组件都通过数组 $user = [
//     'username' => 'your username',
//     'password' => 'your password',
// ] 形式传递登录信息,你可以在实例化时传递,也可以通过实例后的对象手动调用login方法完成登录操作。
// 示例代码
$educaiton = new Megoc\Ecjtu\Components\Education([
    'username' => 'your username',
    'password' => 'your password',
]);

// 获取2018.1学期的成绩
$score = $educaiton->score('2018.1');
var_dump($score);

// and so on...



bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
bash
php composer.phar