1
I wonder how I can take the contents of the div with class="x-product" and save in an array so I can manipulate them later.
I tried that code but it didn’t work.
<?php
$url = "http://www.megamamute.com.br/hardware/placas-de-video?PS=16";
$conteudo=file_get_contents($url);
preg_match_all('/<div class="x-product">(.+)<\/div>/', $url, $conteudo);
//echo $conteudo[1][0];
echo $conteudo;
?>
Note: I want to then take the image, the description and the value of the product to put in a page of the site I am creating.
Didn’t work means he didn’t pick up the pattern or came over things?
– rray