Retrieve Page Count from JSON Headr

After a ridiculous amount of googling and experimenting I can not figure out how to retrieve X-pages data from the JSON Header using PHP (For /markets/{region_id}/orders/ ) I can do the rest of what I want, just can not solve this. Any tips, clues, help?

Thank you.

It depends on what method you’re using to download from the endpoints.

$json = file_get_contents(‘https://esi.evetech.net/latest/markets/‘.$nextRegion.’/orders/?datasource=tranquility&order_type=all&page=’.$varPage);

$arrItems = json_decode($json, true);

In that case the header are in the $http_response_header variable
https://www.php.net/manual/en/reserved.variables.httpresponseheader.php

Just in case you missed it, there are some really good php libraries, that may make things a fair bit easier.

Thank you so much.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.