I changed parse_wowarmory() to the following and by that eliminated all problems (speed, wrong readouts etc.) I had:
Code:
function parse_wowarmory($url) {
require_once(DIR . '/includes/class_xml.php');
$useragent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4";
$header[] = "Accept-Language:en-en,de;q=0.8,en-us;q=0.5,en;q=0.3";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // Ausgabe als String
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 20);
curl_setopt ($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt ($ch, CURLOPT_HTTPHEADER,$header);
$xml = curl_exec($ch);
curl_close($ch);
if ($xml != false)
{
$xmlobj = new vB_XML_Parser($xml);
return $xmlobj->parse();
}
else
{
return false;
}
}