Need some help
Posted: Sun Mar 18, 2007 1:43 pm
Hey gents,
Question for guys who are good in PHP...
What I am looking to do is take the Individual Leaders page and kind of cut it up so I am able to display portions of the stats in a block on my site. So for example in 1 block I'd have the top goal scorers listed. In one below the top point getters, and so on. I think showing this output on the frontpage helps make the website look better.
Second, I am wanting to create 2 blocks again, one which shows the current games played (outputted something like Habs 1 Flyers 0, with a link to each game so GMs can check out the game stats easily), and one which will show the upcoming games for the next day (something like Team vs Team). For the FHL Sim I used the following to display the games played..hopefully someone can create something similar?
Any help is much appreciated.
Thanks in advance guys!
Cheers.
<?php
If (@file ('mrfhl01TodayGames.html') == false) {
print "<b>No Games Today</b>";
}
else {
$lines = file ('mrfhl01TodayGames.html');
foreach ($lines as $line_num => $line) {
If (substr($lines[$line_num],1,1) == "A") {
$Array = preg_split('/ /',$lines[$line_num]);
print "<a " . $Array[1] . " " . $Array[5] . " " . $Array[6] . " " . $Array[7];
print " - " . $Array[8] . " " . $Array[9] . " " . $Array[10] . $Array[11]. $Array[12];
print "<br>";
}
If (substr($lines[$line_num],1,1) == "P") {
echo "<b>" . strip_tags(substr($lines[$line_num],11)) . "</b><p></p>"; }
echo "</a>";
}
echo "</a>";
}
?>
Question for guys who are good in PHP...
What I am looking to do is take the Individual Leaders page and kind of cut it up so I am able to display portions of the stats in a block on my site. So for example in 1 block I'd have the top goal scorers listed. In one below the top point getters, and so on. I think showing this output on the frontpage helps make the website look better.
Second, I am wanting to create 2 blocks again, one which shows the current games played (outputted something like Habs 1 Flyers 0, with a link to each game so GMs can check out the game stats easily), and one which will show the upcoming games for the next day (something like Team vs Team). For the FHL Sim I used the following to display the games played..hopefully someone can create something similar?
Any help is much appreciated.
Thanks in advance guys!
Cheers.
<?php
If (@file ('mrfhl01TodayGames.html') == false) {
print "<b>No Games Today</b>";
}
else {
$lines = file ('mrfhl01TodayGames.html');
foreach ($lines as $line_num => $line) {
If (substr($lines[$line_num],1,1) == "A") {
$Array = preg_split('/ /',$lines[$line_num]);
print "<a " . $Array[1] . " " . $Array[5] . " " . $Array[6] . " " . $Array[7];
print " - " . $Array[8] . " " . $Array[9] . " " . $Array[10] . $Array[11]. $Array[12];
print "<br>";
}
If (substr($lines[$line_num],1,1) == "P") {
echo "<b>" . strip_tags(substr($lines[$line_num],11)) . "</b><p></p>"; }
echo "</a>";
}
echo "</a>";
}
?>