I put a new method to get the item by the item name
/**
* itemnameFetch
*
* This function returns the unserialized XML data
* for an item from the Armory. But now you can use the Item Name instead of the Item ID
* @return string[] An associative array
* @param string $itemNAME The NAME of the item
*/
function itemnameFetch($itemNAME){
I put a new method to get the item by the item name
/**
* itemnameFetch
*
* This function returns the unserialized XML data
* for an item from the Armory. But now you can use the Item Name instead of the Item ID
* @return string[] An associative array
* @param string $itemNAME The NAME of the item
*/
function itemnameFetch($itemNAME){
$url = $this->armory."search.xml?searchQuery=".str_replace(" ", "+",$itemNAME)."&searchType=items";
$item_ary = $this->xmlToArray($this->xmlFetch($url));
$url = $this->armory."item-tooltip.xml?i=".$item_ary['armorysearch']['searchresults']['items']['item']['attributes']['id'];
return $this->xmlToArray($this->xmlFetch($url));
}
Works like a charm! i hope this can be useful.
Thiago Melo <ReiserFS> http://thiago.oxente.org
Thanks for this starting point, I've cleaned up and expanded upon this function and will include it in the class soon as I figure out how. ;)