#1 - 2012/11/27 09:12:00 PM
I'm working with PHP and I want to be able to efficiently check if a character exists within Battle.net's armory. (Meaning, the armory data is available, isn't level sub-10, etc.)Currently, this is how my quick-n-dirty check works:
$url = 'http://'.$region.'.battle.net/api/wow/character/'.$realm.'/'.$member['name'].'?fields= ';
$json = file_get_contents($url);
if ($json !== FALSE){
$decoded = json_decode($json);
if ($decoded !== FALSE || $decoded !== NULL){
/* Add player to Database */
return TRUE;
}
Is there a better way? I really hate pulling all that data needlessly.
Curse
MMO-Champion
WowStead
Arena Junkies
Minecraft Forums
DarthHater
Diablo Fans
Terraria Online