mardi 5 mai 2015

file_get_contents did not return the complete data in PHP

While parsing the below code, file_get_contents(url) returns only part of the data instead of the complete data. After clearing the browsing history and run the same code some more data is avaiable in $data3, but the complete data from the URL is still not retrieved.

Can you please suggest how to resolve this issue to retrieve all the data from the URL?

PHP code:

$results = file_get_contents('urllink');
$json_array = json_decode($results, true);

foreach ($json_array as $value) {

    $key1 = $value["LineageId"];
    $url = "urllink.$key1.apikey";
    echo $url;
    $data3 = file_get_contents($url);
    echo $data3;
}

Aucun commentaire:

Enregistrer un commentaire