|
|
View previous topic :: View next topic |
Author |
Message |
Koljia
Joined: 14 Jul 2007
Posts: 2
WR Updates: 186
Koljia WR Profile
|
Posted: Sat Jul 14, 2007 9:41 am Post subject: Updating the Roster? |
|
|
Hello I have implemented your Roster exporting code to my website and I cant wait to use it.
Unfortunatly my guild roster doesnt seem to update? The guild is a new guild that did happen to be created on the 10th. Does WCR update the information every so often?
Thank you for time.
http://www.loaded-dentarg.com/roster/roster.php
And this is the code.
Code: | <php> 86400 ) // 1 day = 60*60*24
{
//
// We can do a full get
//
// write our new status file
$outfilename = $local_directory . "status.txt";
$outfile = fopen($outfilename, "w");
if( !$outfile )
{
echo "<p>Unable to open save file => " . $outfilename . "<br>";
exit;
}
fputs($outfile, $buffer);
fclose($outfile);
//
// Now get our guild roster file
//
$filename = 'http://www.warcraftrealms.com/exports/guildexport.php?guildid=' . $guild_id;
$infile = fopen ($filename, "r");
if (!$infile)
{
echo "<p>Unable to open remote file.<br>\n";
exit;
}
$outfilename = $local_directory . "guildroster.txt";
$outfile = fopen($outfilename, "w");
if( !$outfile )
{
echo "<p>Unable to open save file => " . $outfilename . "<br>\n";
exit;
}
while (!feof ($infile))
{
$buffer = fgets($infile, 4096);
fputs($outfile, $buffer);
}
fclose($outfile);
fclose($infile);
}
//
// Now let's just output our roster as it's given
//
$filename = $local_directory . "guildroster.csv";
$infile = fopen ($filename, "r");
if (!$infile)
{
echo "<p>Unable to open local roster file.<br>";
exit;
}
// do one read to get the header
$buffer = fgets($infile, 4096);
// read the entries
echo '<table border="1" cellpadding="0" cellspacing="0"><tbody><tr><td><small>Name</small></td><td><small>Race</small></td><td><small>Class</small></td><td><small>Level</small></td><td><small>Last Seen</small></td><td><small>Rank</small></td></tr><tr>';
while (!feof ($infile))
{
$buffer = fgets($infile, 4096);
list( $name, $race, $class, $level, $last_seen, $rank ) = explode(",",$buffer);
echo '<tr><td><small>' . $name . '</small></td><td><small>' . $race . '</small></td><td><small>' . $class . '</small></td><td><small>' . $level . '</small></td><td><small>' . $last_seen . '</small></td><td><small>' . $rank . '</small></td></tr>';
}
echo '</table>';
//Printing out the member data
for($i = 1;$i </td> |
|
|
Back to top |
|
 |
Rollie
Site Admin

Joined: 28 Nov 2004
Posts: 5374
Location: Austin, TX
WR Updates: 480,131
Rollie WR Profile
|
Posted: Sat Jul 14, 2007 9:44 am Post subject: |
|
|
Guild rosters are updated best by downloading and taking a Census snapshot. See here for more info:
http://www.warcraftrealms.com/censusfaq.php _________________ phpbb:phpinfo() |
|
Back to top |
|
 |
Koljia
Joined: 14 Jul 2007
Posts: 2
WR Updates: 186
Koljia WR Profile
|
Posted: Sat Jul 14, 2007 11:55 am Post subject: |
|
|
Great. I uploaded my .lua and it seems my CSV has disapeared from my ftp server..
So sorry, but that was wierd. |
|
Back to top |
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|