|
Posted by Dave on 06/04/05 03:20
Craft (crafted@gmail.com) decided we needed to hear...
> have this code and I'm trying to get it to work. It mostly works, but
> $serverpop does not seem to work. What it looks to me like this code
> does is scan http://www.worldofwarcraft.com/serverstatus/ for
> keywords
> and grab the information about the server that you're looking for. Can
> anyone help me try and get the $serverpop part to work?
>
<snip code>
> $serverpop = strtolower(substr(substr($html, -(strlen($html) - ($pos
> +
> $length + 256))), 0, 3));
<snip>
It all seems like a pretty slack way of parsing HTML to me, and not
very robust if the HTML changes - its crying out for a rewrite ;)
Your problem with serverpop is probably to do with the number 256
above... seems like thats meant to step past all of those blanks
in the HTML to actually get to the <TD> that contains the value
required. You could try doing some manual char counting in the HTML
file and in/de-creasing the 256 as appropriate - or by trial and
error, which ever suits you.
--
Dave <dave@REMOVEbundook.com>
(Remove REMOVE for email address)
Navigation:
[Reply to this message]
|