getClient()->request('GET', $this->gethost() . $url); return $response->getBody()->getContents(); } final public function getInnerHTML(string $url, $tag = false) { $crawler = new Crawler($this->getContent($url)); return $tag ? $crawler->filter($tag)->html() : $crawler->html(); } final public function getLinks(string $html, string $tag = "a"): array { $crawler = new Crawler($html); return $crawler->filter($tag)->each( function (Crawler $node) { return $node->attr("href"); } ); } final public function getImages(string $html, $tag = "img"): array { $crawler = new Crawler($html); return $crawler->filter($tag)->each( function (Crawler $node) { return $node->attr("src"); } ); } }