public function getEveCentralMarketStat($id, $region = null) { if ($region != null && (!is_numeric($region) || $region > 11000030 || $region < 10000001)) { throw new Exception('Region out of range (' . $region . ')!'); } if (!isset($id) || !is_numeric($id) || $id < 1 || $id > 100000000000.0) { throw new Exception('ID out of range (' . $id . ')!'); } $this->evecentral = AleFactory::getEVECentral(); $params = array('typeid' => array($id)); if ($region != null) { $params['regionlimit'] = array($region); } return $this->evecentral->marketstat($params); }
require_once 'config/config.php'; // contains contract_viewer_keyId and contract_viewer_vCode initialization require_once 'dataHandling/objects/ale/factory.php'; require_once 'dataHandling/objects/station.php'; require_once 'structure/preload.php'; if (contract_viewer_keyId == '' || contract_viewer_vCode == '') { exit; } //get ALE object try { // which contract attributes to display; columns are displayed in the order listed below $attributeList = array('title', 'price', 'dateExpired'); $nAttributes = count($attributeList); $station = new Station(); $ale = AleFactory::getEVEOnline(); $ale->setKey(contract_viewer_keyId, contract_viewer_vCode); //set user credentials, third parameter $characterID is also possible; $account = $ale->account->Characters(); //let's fetch characters first. //you can traverse <rowset> element with attribute name="characters" as array foreach ($account->result->characters as $character) { //this is how you can get attributes of element //$characterID = $character->characterID; //set characterID for Contracts $ale->setCharacterID($character->characterID); $contracts = $ale->char->Contracts(); include 'structure/contractList.php'; } } catch (Exception $e) { echo $e->getMessage();