public function execute() { if ($this->Url == null) { return ''; } $content = HttpLoader::get($this->Url, $this->RandomAgents, $this->PostData); switch ($this->Format) { case "json": $content = json_decode($content); break; } return $content; }
public function execute($pid = null) { $url = null; $postData = null; if ($pid != null) { if (isset($this->Urls[$pid])) { $url = $this->Urls[$pid]; } if (isset($this->PostDatas[$pid])) { $postData = $this->PostDatas[$pid]; } } else { $url = $this->Url; } $content = HttpLoader::get($url, $this->RandomAgents, $postData); switch ($this->Format) { case "json": $content = json_decode($content); break; } return $content; }