获取网页源代码

    1. <?php
    2. $http = HttpRequest::newSession();
    3. $response = $http->get('http://www.baidu.com/');
    4. $content = $response->body(); // 网页源码