Ciao a tutti, ho un file json da leggere tramite php ma non riesco a recuperare le foto dell'articolo giusto o la pagina mi va in time out qualcuno mi può aiutare grazie mille:
###########php#################
$url = 'http://www.app-lignano.it/immobiliarelignano/cont.php';
$html = file_get_contents($url);
$json = preg_replace('/,\s*([\]}])/m', '$1', utf8_encode($html));
$json_decoded = json_decode($json);
$i = 0;
$img = 0;
while ($i < count($json_decoded->{'products'})) {
while ($img < count($json_decoded->{'products'}->{'images'}->{'name'})) {
echo "<div>" .
"".$json_decoded->{'products'}[$i]->{'title'} . "
".
$json_decoded->{'products'}[$i]->{'description'} .
$json_decoded->{'products'}[$i]->{'images'}[$img]->{'name'} .
//$json_decoded->{'products'}[$i]->{'images'} .
"</div><hr>";
$img++;
$i++;
}
}

Rispondi quotando
