Page 2 of 2

Posted: Tue May 03, 2005 12:30 pm
by anthony88guy

Code: Select all

<?php
$f = "http://www.kingsofchaos.com/stats.php?id=654760";
$site = file_get_contents($f);

$found = preg_match ('#<td><b>Army size:</b></td>[\n\s]*<td>([\d,]*?)</td>#', $site, $match);
if ($found){
    echo 'Army size: '.$match[0];
}else{
    echo 'No matches.';
}

?>
It returns no matches. I've searched google for regex, but where would be a good tutorial or site that could help me out. This regex stuff is pretty foreign to me.