Skip to content

Instantly share code, notes, and snippets.

@jbhannah
Created August 7, 2011 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbhannah/1129909 to your computer and use it in GitHub Desktop.
Save jbhannah/1129909 to your computer and use it in GitHub Desktop.
World of Warcraft community API character data fetcher
<?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