Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // This file is UTF-8 encoded
- $char = 'Dæàüiãøïôâßû';
- $realm = 'Hyjal';
- $area = 'eu';
- $profile = @json_decode(@file_get_contents('http://' . $area . '.battle.net/api/wow/character/' . urlencode($realm) . '/' . urlencode($char) . '?fields=guild,pvp'));
- ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <title><?php echo @$profile->name ?></title>
- </head>
- <body>
- <?php
- if (empty($profile))
- echo "Character $char not found";
- else
- {
- echo '<img src="http://' . $area . '.battle.net/static-render/' . $area . '/' . $profile->thumbnail . '" />';
- echo "<h1>$profile->name</h1>";
- if (!empty($profile->guild))
- echo "<h2><" . $profile->guild->name . "></h2>";
- echo '<pre>' . print_r($profile, true) . '</pre>';
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement