Created
August 7, 2011 00:04
-
-
Save jbhannah/1129909 to your computer and use it in GitHub Desktop.
World of Warcraft community API character data fetcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-type: application/json'); | |
if ( array_key_exists('char', $_GET) && array_key_exists('realm', $_GET) ) { | |
$char = $_GET['char']; | |
$realm = $_GET['realm']; | |
} else { | |
echo json_encode(array()); | |
return; | |
} | |
$curl = curl_init("http://us.battle.net/api/wow/character/${realm}/${char}"); | |
curl_exec($curl); | |
curl_close($curl); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment