Is it possible, without resorting to cURL
or to an external library, to follow the html link? I explain. the first file_get_contents
below points to the main page, I would like the second file_get_contents
to point to the link found in href
. How is it possible?
$html = file_get_contents("https://pt.aliexpress.com/"); $re = '/href="(.*?)".src="(.?)"/'; preg_match_all($re, $html, $data);
$html1 = file_get_contents("link do href acima"); $re = '/href="(.*?)".src="(.?)"/'; preg_match_all($re, $html1, $data1);