Jump to content

Help with pulling numbers


Vmi90

Recommended Posts

its all inthe source correct?

jsut steal the source and have it search for what you want... heres something i've made to copy unreal tournament stats...

[code]
<?
/// PLAYER STATUS

$output = "";
$lines = file('http://www.shadyserver.com/stats/?p=players&filter=games&sort=DESC');

$linenumber = 0;

// in the source the value is located between "center"> and Score.... that the score value to i copied it
foreach ($lines as $line_num => $line)
{
    $line = str_replace('<td class="grey" align="center">','Score:    ', $line);
    $line = str_replace('</td>', ' ', $line);
    $output.= htmlspecialchars($line)."<br>";
}

if($line_num == ($linenumber+3))
{
    $line = str_replace('<td class="grey" align="center">','Frags:    ', $line);
    $line = str_replace('</td>', ' ', $line);
    $output.= htmlspecialchars($line)."<br>";
}
[/code]

... i dunno i wrote this a long time ago... you can see it work at my site www.shadyserver.com ... in the otp right of the page put in TheIronChef .... the code is shown on the right side of the page ...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.