所以我构建了搜寻器,可以从值中爬取链接中的所有数据,因此,我需要一种在单击图像时将图像的值输出到$_POST['']
的方法,以及如何?
require 'vendor/autoload.php';
use Symfony\Component\DomCrawler\Crawler;
$client = new \GuzzleHttp\Client();
$furl = 'https://hentaifox.com';
$res = $client->request('GET', $furl);
$html = ''.$res->getBody();
$crawler = new Crawler($html);
$url_f = $crawler->filter('#content .galleries_overview .item')->each(function(crawler $node, $i) {
//echo $node->html();
$image = $node->filter('img')->attr('src');
$src = $node->filter('a')->attr('href');
$href = 'https://hentaifox.com/'. $src;
?>
<form method="post" id="manga">
<input type="image" name="<?php echo $src ?>" src="<?php echo $image ?>" width="120" height="168" value="<?php echo $href ?>">
</form>
<?php }); ?>