src/curlient/crawler/PageCrawler.php
private function getContent($url, Curlient $client, $cfg, $gcfg) {

		if (isset($cfg['method']) && $cfg['method'] == 'post') {
			$client->request($url, 'post', isset($cfg['data']) ? $cfg['data'] : null);
		} else {
			$client->request($url);
		}

		if (isset($cfg['ajax'])) {
			$client->ajax();
		}

		if (isset($cfg['encoding'])) {
			$encoding = $cfg['encoding'];
		} else if (isset($gcfg['encoding'])) {
			$encoding = $gcfg['encoding'];
		}

		if (isset($cfg['json']) && $cfg['json']) {
			$content = $client->json(isset($encoding) ? $encoding : null);
		} else {
			$content = $client->text(isset($encoding) ? $encoding : null);
		}

		return $content;
	}
private function getContent($url, Curlient $client, $cfg, $gcfg) {

		if (isset($cfg['method']) && $cfg['method'] == 'post') {
			$client->request($url, 'post', isset($cfg['data']) ? $cfg['data'] : null);
		} else {
			$client->request($url);
		}

		if (isset($cfg['ajax'])) {
			$client->ajax();
		}

		if (isset($cfg['encoding'])) {
			$encoding = $cfg['encoding'];
		} else if (isset($gcfg['encoding'])) {
			$encoding = $gcfg['encoding'];
		}

		if (isset($cfg['json']) && $cfg['json']) {
			$content = $client->json(isset($encoding) ? $encoding : null);
		} else {
			$content = $client->text(isset($encoding) ? $encoding : null);
		}

		return $content;
	}
抓取内容

@param string             $url
@param \curlient\Curlient $client
@param array              $cfg
@param array              $gcfg

@return array|null|string