These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

[HELP] Statement returning unexpected results. API - Corp Titles

Author
Puppy UK
Viziam
Amarr Empire
#1 - 2013-03-31 10:19:39 UTC  |  Edited by: Puppy UK
Ok, here is the function code : http://pastebin.com/GGEpj6YV

function apiCheckTitle($forumUsername, $apiTitle){
$keyID = forumGetUserApi($forumUsername);
$vCode = forumGetUserVcode($forumUsername);
$url = "https://api.eveonline.com/char/CharacterSheet.xml.aspx?keyID=" . $keyID . "&vCode=" . $vCode;
$xml = makeApiRequest($url);
if (!$xml->error){
foreach ($xml->result->rowset as $rowset){
if ($rowset->attributes()->name == "corporationTitles")
{
foreach ($rowset->row as $row){
$titlename = $row->attributes()->titleName;
if ($titlename == $apiTitle){
echo "Yes:" . $titlename . ":" . $apiTitle . ":";
} //end here
else{
echo "No:" . $titlename . ":" . $apiTitle . ":";
}
}
}
}
}
}

and here is the output :

No:Member:Member:
No:Recruiter:Member:



For the life of me I can not find out why if ($titlename == $apiTitle) is not triggering.

I have tried forcing them both to strings.... no luck... so very stuck on a so very basic portion of my code.

figured it out : I have in game colors workgin onthe titles so the actual string was : color=0xffcccccc>Altcolor

of course this was not displaying on the php page.

Any help appreciated.