mysql - PHP WoW Battle.net Armory API library: Pulling data from cache in db -


i using library: https://sourceforge.net/p/wowarmoryapi/home/home/ lacks documentation. forums there unanswered.

i've been able pull data battle net's armory, guild information. stored in wa_guilds table large blob in row called data. there i'm unsure how pull , display it. i've tried code below , 100 different variations of unserialize i'm inexperienced. past level of knowledge.

my error: notice: undefined index: object i've tried name, level, rank

new error caused print $roster->character;: "notice: trying property of non-object"

my code:

<?php include('_inc.php'); // shh i'm hunting wabbits $conn = mysqli_connect("localhost", "root", "")     or die(mysql_error()); mysqli_select_db($conn, "wow")     or die(mysql_error()); $data = mysqli_query($conn, "select data wa_guilds") or die(mysql_error());  //echo $data;  print "<table border cellpadding=3>";  while($info = mysqli_fetch_array( $data, mysqli_both ))  {        $roster = json_decode($info[0]);     print $roster->character; }  print "</table>";  //$array = explode(',', $data); //echo $array[0];  ?> 

it looks popular library i'm hoping has experience it.

some data var_dump:

array(2) { [0]=> string(100000) "{"lastmodified":1367433943000,"name":"teh fail","realm":"zul'jin","battlegroup":"ruin","level":25,"side":1,"achievementpoints":1195, [{"character":{"name":"mundi","realm":"zul'jin","battlegroup":"ruin","class":8,"race":8,"gender":0,"level":85,"achievementpoints":12855,"thumbnail":"zuljin/65/3357249-avatar.jpg","guild":"teh fail","spec":{"name":"fire","role":"dps","backgroundimage":"bg-mage-fire","icon":"spell_fire_firebolt02","description":"ignite enemies balls of fire , combustive flames.","order":1}},"rank":3},{"character":{"name":"kekeke","realm":"zul'jin","battlegroup":"ruin","class":4,"race":8,"gender":0,"level":85,"achievementpoints":11345,"thumbnail":"zuljin/76/3359564-avatar.jpg","guild":"teh fail","spec":{"name":"combat","role":"dps","backgroundimage":"bg-rogue-combat","icon":"ability_backstab","description":"a swashbuckler uses agility , guile stand toe-to-toe enemies.","order":1}},"rank":3},{"character":{"name":"benth","realm":"zul'jin","battlegroup":"ruin","class":9,"race":5,"gender":0,"level":90,"achievementpoints":13165,"thumbnail":"zuljin/252/3364348-avatar.jpg","guild":"teh fail","spec":{"name":"destruction","role":"dps","backgroundimage":"bg-warlock-destruction","icon":"spell_shadow_rainoffire","description":"a master of chaos calls down fire burn , demolish enemies.","order":2}},"rank":3}

edit: changed mysqli database connection lines pdo , well.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -