We have changed to using preg_match for realmstatus in roster 1.7.1
So all this substr, stristr, strpos changes wont be needed
shaun.voysey wrote:After an Exhaustive search through the html parser. I have... <smuggly>
...fixed the problem with the Realmstatus.
Find, in your wowroster Directory, the file 'realmstatus.php'
open the file in a text editor and ...
find
- Code: Select all
// Figure out Server Pop.
foreach($pops as $p)
{
$serverpop = stristr(substr($html, ($pos + 290), 35), $p);
replace with
- Code: Select all
// Figure out Server Pop.
foreach($pops as $p)
{
$serverpop = stristr(substr($html, ($pos + 288), 35), $p);
The problem comes down to the new pages on the European website.
The substring was 2 characters too far, so the Population Variable was not set, so the database was not updated.
Simple really.
//==========[ HTML PARSER ]============================================================
if (isset($html) && $html)
{
$pos = strpos($html, str_replace('\\', '',str_replace("'", ''', $server)));
if (!$pos)
{
$error = $error.', check Realm name';
$err = 1;
}
// Figure out Serverstatus
$serverstatus = stristr(substr($html, ($pos - 165), 15), 'up');
if (!$serverstatus)
{
$serverstatus = 'Down';
$serverpop = 'Offline';
}
else
{
$serverstatus = 'Up';
// Figure out Server Pop.
foreach($pops as $p)
{
$serverpop = stristr(substr($html, ($pos + 288), 35), $p);
if($serverpop)
{
$foundpop = 1;
$serverpop = $p;
break;
}
}
if(!$foundpop)
{
$err = 1;
}
}
// Figure out Servertype
foreach($types as $t)
{
$servertype = stristr(substr($html, ($pos + 130), 30), $t);
if($servertype)
{
$foundtype = 1;
$servertype = $t;
break;
}
}
if(!$foundtype)
{
$err = 1;
}
}
elseif ($xml)
{
FireBladeXL wrote:I tried this too, but i still get the "No status" image.
anyone know what to adjust to log EU server "Thunderhorn" ??
if (isset($html) && $html)
{
$pos = strpos($html, str_replace('\\', '',str_replace("'", ''', $server)));
if (!$pos)
{
$error = $error.', check Realm name';
$err = 1;
}
$pos = strpos($html, str_replace('\\', '',str_replace("'", '\'', $server)));
if (!$pos)
{
$error = $error . ', check Realm name';
$err = 1;
}
Return to General Support & Feedback
Users browsing this forum: No registered users and 1 guest