Also of note when you read the export.txt using PHP you should:
$filedata = preg_replace('/\\0/', "", $filedata);
// $filedate = the text file data. This removes NULL characters aka \0 from the file which are everywhere.
--- My Processor Code: ---
if(isset($_FILES['file'])) {
$file = $_FILES['file']['tmp_name']; // XML feed file/URL
$filedata = file_get_contents($file);
$filedata = preg_replace('/\\0/', "", $filedata);
$guilddata = explode(PHP_EOL, $filedata);
foreach ($guilddata as &$gd) {
if($i==0) {
$gdata = explode("|", $gd);
$guild['id'] = $gdata[1];
$guild['name'] = $gdata[2];
$guild['rank'] = $gdata[3];
$guild['renown'] = $gdata[4];
$guild['exp'] = $gdata[5];
$guild['nextlevel'] = $gdata[6];
// UPDATE GUILD QUERY
print "<pre>";
print_r($guild);
print "</pre>";
} else {
$cdata = explode("|", $gd);
$character['mythid'] = $cdata[0];
$character['character'] = $cdata[1];
$character['level'] = $cdata[2];
$character['type'] = $cdata[3];
$character['gamerank'] = $cdata[4];
$character['gamerankname'] = $cdata[5];
$character['lastlogin'] = date("Y-m-d", strtotime($cdata[6]));
// UPDATE/ADD CHARACTER
print "<pre>";
print_r($character);
print "</pre>";
}
}
Working on new Addon: GuildRosterExport - Need Advice
Forum rules
Before posting on this forum, be sure to read the Terms of Use
Before posting on this forum, be sure to read the Terms of Use
Re: Working on new Addon: GuildRosterExport - Need Advice
Foghladha
Founder & Activities Director
Gaiscioch Social Gaming Community
Discord | Twitch | YouTube | Twitter
Founder & Activities Director
Gaiscioch Social Gaming Community
Discord | Twitch | YouTube | Twitter
Ads
Re: Working on new Addon: GuildRosterExport - Need Advice
That data isn't shared in the API, so you can't get other players exp or renownfoghladha wrote:I was wondering if anyone new a way to pull the current renown and exp of each player in the roster.







Re: Working on new Addon: GuildRosterExport - Need Advice
So for that i need to create a mod that individual players can run and upload. Your script gave a great foundation to making that happen. Youve opened so many doors for me
. Thanks again!
P.S. is there a way to run an external app from the lua interface to upload the export file automatically? I think curse or wardb.com used to have one. From a security standpoint i think that would be bad but might still be possible.

P.S. is there a way to run an external app from the lua interface to upload the export file automatically? I think curse or wardb.com used to have one. From a security standpoint i think that would be bad but might still be possible.
Foghladha
Founder & Activities Director
Gaiscioch Social Gaming Community
Discord | Twitch | YouTube | Twitter
Founder & Activities Director
Gaiscioch Social Gaming Community
Discord | Twitch | YouTube | Twitter
Re: Working on new Addon: GuildRosterExport - Need Advice
You needed a program to run in the background that checked for a file (like the one above that gets created) and upladed the results from that filefoghladha wrote:So for that i need to create a mod that individual players can run and upload. Your script gave a great foundation to making that happen. Youve opened so many doors for me. Thanks again!
P.S. is there a way to run an external app from the lua interface to upload the export file automatically? I think curse or wardb.com used to have one. From a security standpoint i think that would be bad but might still be possible.







Who is online
Users browsing this forum: No registered users and 5 guests