["445"] = 2,--Warlord |
["712"] = 2,--Warsong Outrider |
["603"] = 2,--Wrath of the Horde |
} |
|
--PHP CODE TO EXTRACT THE LIST FROM WOWHEAD |
--[[<?php |
|
$URLs = array( |
"http://www.wowhead.com/achievements?filter=si=-1;cr=9;crs=2;crv=4000" => 1, |
"http://www.wowhead.com/achievements?filter=si=-1;cr=9;crs=5;crv=4000" => 1, |
"http://www.wowhead.com/achievements?filter=si=-2;cr=9;crs=2;crv=4000" => 2, |
"http://www.wowhead.com/achievements?filter=si=-2;cr=9;crs=5;crv=4000" => 2 |
); |
$completearray = array(); |
foreach($URLs as $URL => $side){ |
$page = file_get_contents($URL); |
|
$page = str_replace(array("\r\n", "\n", "\r"), '', $page); |
|
|
$pos = strpos($page, '<div id="lv-achievements" class="listview">'); |
$wokingstring = substr($page, $pos); |
$wokingstring = str_replace('<div id="lv-achievements" class="listview"></div><script type="text/javascript">//<![CDATA[var _ = {};', '', $wokingstring); |
|
$pos = strpos($wokingstring, '_ = g_achievements;'); |
$wokingstring = substr($wokingstring, 0, $pos); |
|
$wokingstring = str_replace(';$.extend(true, g_achievements, _);', "", $wokingstring); |
|
$workingarray = explode(';', $wokingstring); |
|
|
foreach($workingarray as $achievement){ |
$pos = strpos($achievement, "',icon:'"); |
$achievement = substr($achievement, 0, $pos); |
$achievement = str_replace(array("_[", "]={name_enus:'"), array('', '*-*'), $achievement); |
$achievement = explode('*-*', $achievement); |
$completearray[$achievement[0]] |
--[[ = $side . ',--' . str_replace('\\','',$achievement[1]); |
} |
|
} |
|
foreach($completearray as $k => $v){ |
echo '["' . $k . '"] = ' . $v . '<br />'; |
} |
|
?>]] |