<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>WarcraftRealms.com</title>
  <link>http://www.warcraftrealms.com/forum/index.php</link>
  <description>General Forum for &lt;a href='../index.php'&gt;WarcraftRealms.com&lt;/a&gt;</description>
  <language>english</language>
  <copyright>(c) Copyright 2013 by WarcraftRealms.com</copyright>
  <managingEditor>csellers@warcraftrealms.com</managingEditor>
  <webMaster>csellers@warcraftrealms.com</webMaster>
  <pubDate>Tue May 21, 2013 11:10 pm</pubDate>
  <lastBuildDate>Tue May 21, 2013 11:10 pm</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>WarcraftRealms.com</title>
    <url></url>
    <link>http://www.warcraftrealms.com/forum/</link>
    <description>General Forum for &lt;a href='../index.php'&gt;WarcraftRealms.com&lt;/a&gt;</description>
  </image>

                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=12107#12107</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=3690'&gt;Groyff&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Oct 23, 2006 5:15 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I guess this request is obsolete, dantoonina?&lt;br /&gt;
If you still want them I'll send'em&lt;br /&gt;
&lt;br /&gt;
/G</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=12107#12107</comments>
                                        <author>Groyff</author>
                                        <pubDate>Mon Oct 23, 2006 5:15 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=12107#12107</guid>
                                      </item>
                                      <item>
                                        <title>Can I get the php files?</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=9381#9381</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=55833'&gt;dantoonina&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Jun 01, 2006 3:13 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Groyff,&lt;br /&gt;
Can you do me a favor?  Can I get a copy of the php files?  If you zip them up, I would like to use yours on our guild site.  I don't know much, but if you can add a not how to install it to a database I can create, I think I can get it running.  Can you send it to me at my email address?  Thanks in advance.&lt;br /&gt;
&lt;br /&gt;
Anthony&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Groyff wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;Thanks for the tip Ceto. For now I've done it so I have the rosterupdater at a server with remote file access, but the form thing sounds like good idea, gonna check in to it when I got then time.&lt;br /&gt;
&lt;br /&gt;
The roster can be seen at &lt;a href=&quot;http://www.violence-reborn.co.uk&quot; target=&quot;_blank&quot;&gt;http://www.violence-reborn.co.uk&lt;/a&gt; &lt;br /&gt;
oh, and I'm gonna add info that data is fetched from &lt;a href=&quot;http://www.warcraftrealms.com&quot; target=&quot;_blank&quot;&gt;www.warcraftrealms.com&lt;/a&gt; aswell, just slipped my mind.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=9381#9381</comments>
                                        <author>dantoonina</author>
                                        <pubDate>Thu Jun 01, 2006 3:13 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=9381#9381</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=7463#7463</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=3690'&gt;Groyff&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Fri Jan 13, 2006 6:27 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Thanks for the tip Ceto. For now I've done it so I have the rosterupdater at a server with remote file access, but the form thing sounds like good idea, gonna check in to it when I got then time.&lt;br /&gt;
&lt;br /&gt;
The roster can be seen at &lt;a href=&quot;http://www.violence-reborn.co.uk&quot; target=&quot;_blank&quot;&gt;http://www.violence-reborn.co.uk&lt;/a&gt; &lt;br /&gt;
oh, and I'm gonna add info that data is fetched from &lt;a href=&quot;http://www.warcraftrealms.com&quot; target=&quot;_blank&quot;&gt;www.warcraftrealms.com&lt;/a&gt; aswell, just slipped my mind.</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=7463#7463</comments>
                                        <author>Groyff</author>
                                        <pubDate>Fri Jan 13, 2006 6:27 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=7463#7463</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=7407#7407</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=19518'&gt;Ceto&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Jan 12, 2006 11:18 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      If you have shell access, you could probably write a bash/python/etc. script to download the roster. You can even have the script spawn whatever PHP script parses the file, set it all up via cron for automatic updates ever 12 hours or so.&lt;br /&gt;
&lt;br /&gt;
Or, here's a crazy idea: create a web page with a textarea form field. Set a JavaScript onload event that checks for an updated roster, fetches that roster via HTTP, and inserts the content into the form field. On submit, the data goes to a PHP script that injects the roster into your database. That way you're sidestepping all the server-side issues and providing the data via your web browser, sort of like uploading the census .txt file but with less intervention.</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=7407#7407</comments>
                                        <author>Ceto</author>
                                        <pubDate>Thu Jan 12, 2006 11:18 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=7407#7407</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=7396#7396</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=3690'&gt;Groyff&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Jan 12, 2006 8:31 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Hi!&lt;br /&gt;
Perhaps I should post this at a sql/php forum. But I'll try here first. &lt;br /&gt;
&lt;br /&gt;
Trying to create a workaround to the remote file access problem.&lt;br /&gt;
Since our guild forums host don't allow fopen and don't have cURL installed can I for the Guild Roster point to a sql-database located on a different server?&lt;br /&gt;
Or even better, could I have a php-script situated elsewhere uploading roster info to a the database at the forum host.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
Groyff</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=7396#7396</comments>
                                        <author>Groyff</author>
                                        <pubDate>Thu Jan 12, 2006 8:31 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=7396#7396</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=6039#6039</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=-1'&gt;Anonymous&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun Nov 27, 2005 4:57 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Just a quick noobie question here.  How do I know what database the characters table is going into?  It would be nice if the database scripts and instructions for this part would still be updated, and maybe some more examples! &lt;img src=&quot;images/smiles/icon_smile.gif&quot; alt=&quot;Smile&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
My Background:&lt;br /&gt;
I know HTML decently, I can follow php code (or know where to look to figure out what its doing), mysql I'm so so with (mainly do anything required through myphpadmin.</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=6039#6039</comments>
                                        <author>Anonymous</author>
                                        <pubDate>Sun Nov 27, 2005 4:57 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=6039#6039</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=3304#3304</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=11175'&gt;Precisi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Thu Sep 01, 2005 8:58 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I have SOME sql experience, but I'm a bit confused on what to do with all this code. Is anyone willing to write up some simple instructions like..&lt;br /&gt;
&lt;br /&gt;
Step 1: Make a database with these fields..&lt;br /&gt;
Step 2: Use this code named as this file..&lt;br /&gt;
etc.&lt;br /&gt;
&lt;br /&gt;
It would be greatly appreciated. I would like to get a nice guild listing on my guilds site (redesigning the whole thing or I would link to it) and then once I get everything all set up I'm willing to provide all the files in a tidy zip with easy instructions for other people like me who &quot;don't quite get it&quot;. &lt;br /&gt;
&lt;br /&gt;
I have a basic guild roster running here: &lt;a href=&quot;http://closetgamers.snowshoedesign.com/census/&quot; target=&quot;_blank&quot;&gt;http://closetgamers.snowshoedesign.com/census/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I used Schwarzhuf's code, but I would like to offer sorting and whatnot with a database. &lt;br /&gt;
&lt;br /&gt;
Any guidance is appreciated!</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=3304#3304</comments>
                                        <author>Precisi</author>
                                        <pubDate>Thu Sep 01, 2005 8:58 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=3304#3304</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=1629#1629</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=2'&gt;Rollie&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Apr 30, 2005 12:59 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Long as the link is there, I'm happy =)  Any language will do!  Cept maybe Swahili.... wonder what that would look like anyway... hrm...</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=1629#1629</comments>
                                        <author>Rollie</author>
                                        <pubDate>Sat Apr 30, 2005 12:59 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=1629#1629</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=1622#1622</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=-1'&gt;Anonymous&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Apr 30, 2005 5:09 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Hi There!&lt;br /&gt;
&lt;br /&gt;
I did a solution that clears the table completely, so removing chars no longer in the guild according to census data.&lt;br /&gt;
&lt;br /&gt;
the main file &quot;roster.php&quot; will include the &quot;getdata.php&quot; whenever the file is called and the timestamp in the database is not corresponding with the current timestamp of the census data, therefore not loading/processing the code for updating when not needed&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;$filename = &amp;quot;http&amp;#58;//www.warcraftrealms.com/exports/status.txt&amp;quot;;&lt;br /&gt;
$fp = fopen&amp;#40;$filename,&amp;quot;r&amp;quot;&amp;#41;;&lt;br /&gt;
$status = fread&amp;#40;$fp,65535&amp;#41;;&lt;br /&gt;
$query = &amp;quot;SELECT * FROM timestamp WHERE timestamp = $status&amp;quot;;&lt;br /&gt;
$result = mysql_query&amp;#40;$query&amp;#41;;&lt;br /&gt;
$count=mysql_numrows&amp;#40;$result&amp;#41;;&lt;br /&gt;
if &amp;#40;$count == 0&amp;#41;&lt;br /&gt;
&amp;#123;&lt;br /&gt;
include &amp;#40;&amp;quot;getdata.php&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;#125;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
the getdata.php looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;lt;?php$row = 1;&lt;br /&gt;
$i = 0;&amp;nbsp; &amp;nbsp; // used to clear headers from csv file&lt;br /&gt;
$handle = fopen &amp;#40;&amp;quot;http&amp;#58;//www.warcraftrealms.com/exports/guildexport.php?guildid=foobar&amp;quot;,&amp;quot;r&amp;quot;&amp;#41;;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
// clear table first&lt;br /&gt;
$clear = &amp;quot;TRUNCATE TABLE characters&amp;quot;;&lt;br /&gt;
mysql_query&amp;#40;$clear&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
// insert new data&lt;br /&gt;
while &amp;#40; &amp;#40;$data = fgetcsv &amp;#40;$handle, 1000, &amp;quot;,&amp;quot;&amp;#41;&amp;#41; !== FALSE &amp;#41; &amp;#123; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;if &amp;#40;$i != 0&amp;#41; // $i will be 0 when column headers are provided &lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$update=&amp;quot;INSERT INTO characters &amp;#40;CharName, Race, Class, Level, LastSeen, GuildRank&amp;#41; VALUES &amp;#40;'$data&amp;#91;0&amp;#93;','$data&amp;#91;1&amp;#93;','$data&amp;#91;2&amp;#93;','$data&amp;#91;3&amp;#93;','$data&amp;#91;4&amp;#93;','$data&amp;#91;5&amp;#93;'&amp;#41;&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;mysql_query &amp;#40;$update&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$i++;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
fclose &amp;#40;$handle&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// update the timestamp in the database&lt;br /&gt;
$updatestatus=&amp;quot;UPDATE timestamp SET timestamp = $status&amp;quot;;&lt;br /&gt;
mysql_query &amp;#40;$updatestatus&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
the performance would be better using inserts and updates of course, but if your guild does not have 5K+ members you will not feel it i guess &lt;img src=&quot;images/smiles/icon_wink.gif&quot; alt=&quot;Wink&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
you can find a running copy here: &lt;br /&gt;
&lt;a href=&quot;http://www.warmuth.cc/roster/roster.php&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;http://www.warmuth.cc/roster/roster.php&lt;/a&gt;&lt;br /&gt;
The running version includes a column representing the char as a &quot;main&quot; or &quot;alt of &amp;lt;maincharname&amp;gt;&quot;&lt;br /&gt;
&lt;br /&gt;
hope this helps, cheers, Vimes&lt;br /&gt;
&lt;br /&gt;
P.S.: I did the obligatory link in german language on the page, i hope you don't mind &lt;img src=&quot;images/smiles/icon_wink.gif&quot; alt=&quot;Wink&quot; border=&quot;0&quot; /&gt;</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=1622#1622</comments>
                                        <author>Anonymous</author>
                                        <pubDate>Sat Apr 30, 2005 5:09 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=1622#1622</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=1286#1286</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=2'&gt;Rollie&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Mar 21, 2005 1:13 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      One easy way to do that would be to delete all entries each time before you update it.</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=1286#1286</comments>
                                        <author>Rollie</author>
                                        <pubDate>Mon Mar 21, 2005 1:13 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=1286#1286</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=1104#1104</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=-1'&gt;Anonymous&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Mar 05, 2005 12:22 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Nevermind the issues I had, was with a setting in my PHP.ini.  That last code that I posted works great.  Just comment out some of the unnecessary echo lines.  Thanks for the help on that Rollie.</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=1104#1104</comments>
                                        <author>Anonymous</author>
                                        <pubDate>Sat Mar 05, 2005 12:22 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=1104#1104</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=1103#1103</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=-1'&gt;Anonymous&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Mar 05, 2005 12:10 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Here's my code, however, when it updates there are some issues with update speed.  As it goes through the document it sometimes stops halfway through.  Therefore not everything is updated.  In order to get all the information on the database I would need to uncomment the resetlocaltime line which would then cause the update everytime (which you do not want us to do).  Let me know if you have any solutions.&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
include&amp;#40;'db_connect.php'&amp;#41;;&lt;br /&gt;
// 64361&lt;br /&gt;
global $guild_id;&lt;br /&gt;
global $local_timestamp;&lt;br /&gt;
global $remote_timestamp;&lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////////////////////////////&lt;br /&gt;
// SQL TABLE SETUP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&lt;br /&gt;
// Census = id, date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&lt;br /&gt;
// guild_roster = id, name, race, class, rank, level, last_seen //&lt;br /&gt;
//////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// Resets the local census status field to null - Debuging Only&lt;br /&gt;
function ResetLocal&amp;#40;&amp;#41;&lt;br /&gt;
&amp;#123;&amp;nbsp; $q = 'UPDATE `Census` SET `date` = &amp;quot;&amp;quot; WHERE `id` = 1 LIMIT 1';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$result = mysql_query&amp;#40;$q&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if &amp;#40;!$result&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; echo 'ERROR&amp;#58; Could not run query&amp;#58; '.mysql_error&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; exit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
&lt;br /&gt;
// Updates the local status field to variable $date&lt;br /&gt;
function UpdateLocal&amp;#40;$date&amp;#41;&lt;br /&gt;
&amp;#123;&amp;nbsp; $q = 'UPDATE `Census` SET `date` = &amp;quot;'.$date.'&amp;quot; WHERE `id` = 1 LIMIT 1';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$result = mysql_query&amp;#40;$q&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if &amp;#40;!$result&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; echo 'ERROR&amp;#58; Could not run query&amp;#58; '.mysql_error&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; exit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;br&amp;gt;Local TimeStamp Updated';&lt;br /&gt;
&amp;#125;&lt;br /&gt;
&lt;br /&gt;
// Reads remote guildinfo.csv file and exports information to database&lt;br /&gt;
function GetRemoteData&amp;#40;&amp;#41;&lt;br /&gt;
&amp;#123;&amp;nbsp; $guild_id=64361;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;br&amp;gt;Getting Data From Census Server';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$filename = 'http&amp;#58;//www.warcraftrealms.com/exports/guildexport.php?guildid='.$guild_id;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$infile = fopen &amp;#40;$filename, &amp;quot;r&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if &amp;#40;!$infile&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; echo &amp;quot;&amp;lt;p&amp;gt;Unable to open remote file.&amp;lt;br&amp;gt;\n&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; exit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;//&amp;nbsp; do one read to get the header&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$buffer = fgets&amp;#40;$infile, 4096&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;//&amp;nbsp; read the entries&lt;br /&gt;
&amp;nbsp; &amp;nbsp;while &amp;#40;!feof &amp;#40;$infile&amp;#41;&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; $buffer = fgets&amp;#40;$infile, 4096&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; list&amp;#40; $name, $race, $class, $level, $last_seen, $rank &amp;#41; = explode&amp;#40;&amp;quot;,&amp;quot;,$buffer&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; echo'&amp;lt;br&amp;gt;NAME&amp;#58; '.$name;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; echo'&amp;lt;br&amp;gt;RACE&amp;#58; '.$race;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; echo'&amp;lt;br&amp;gt;CLASS&amp;#58; '.$class;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; echo'&amp;lt;br&amp;gt;LEVEL&amp;#58; '.$level;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; echo'&amp;lt;br&amp;gt;LAST SEEN&amp;#58; '.$last_seen;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; echo'&amp;lt;br&amp;gt;RANK&amp;#58; '.$rank;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $query = &amp;quot;SELECT id FROM `guild_roster` WHERE name = '$name'&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //echo'&amp;lt;br&amp;gt;QUERY&amp;#58; '.$query;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $result = mysql_query&amp;#40;$query&amp;#41; or die &amp;#40;&amp;quot;&amp;lt;br&amp;gt;Error unable to select &amp;quot; . mysql_error&amp;#40;&amp;#41; . &amp;quot; &amp;lt;br /&amp;gt;\n&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;!$result&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&amp;nbsp; die&amp;#40;'Could not query&amp;#58;' . mysql_error&amp;#40;&amp;#41;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if&amp;#40; ! $row = mysql_fetch_row&amp;#40;$result&amp;#41;&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&amp;nbsp; //&amp;nbsp; there is no entry for this character, so insert&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$query = &amp;quot;INSERT INTO guild_roster &amp;#40; name, race, class, rank, level, last_seen&amp;#41; &amp;quot; .&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;VALUES &amp;#40;'$name', '$race', '$class', '$rank', '$level', '$last_seen'&amp;#41;&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo'&amp;lt;br&amp;gt;QUERY&amp;#58; '.$query;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; mysql_query&amp;#40;$query&amp;#41; or die &amp;#40;&amp;quot;&amp;lt;br&amp;gt;Error unable to insert &amp;quot; . mysql_error&amp;#40;&amp;#41; . &amp;quot; &amp;lt;br /&amp;gt;\n&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo &amp;quot;Inserting new entry =&amp;gt; $name&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&amp;nbsp; //&amp;nbsp; this character is already present, let's just update him&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$charid = $row&amp;#91;0&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo'&amp;lt;br&amp;gt;CHAR ID&amp;#58; '.$charid;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$query = &amp;quot;UPDATE guild_roster SET rank = '$rank', level = '$level', last_seen = '$last_seen' WHERE id = '$charid'&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mysql_query&amp;#40;$query&amp;#41; or die &amp;#40;&amp;quot;&amp;lt;br&amp;gt;Error unable to update &amp;quot; . mysql_error&amp;#40;&amp;#41; . &amp;quot; &amp;lt;br /&amp;gt;\n&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;echo &amp;quot;Updating existing entry =&amp;gt; $name&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fclose&amp;#40;$infile&amp;#41;;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
&lt;br /&gt;
// Creates a table with guild information from local database&lt;br /&gt;
function GetLocalData&amp;#40;&amp;#41;&lt;br /&gt;
&amp;#123;&amp;nbsp; echo'&amp;lt;br&amp;gt;Getting Data From Local Database';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$q = 'SELECT `name`,`race`,`class`,`rank`,`level`,`last_seen` FROM `guild_roster` ORDER BY `class` ';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$result = mysql_query&amp;#40;$q&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if &amp;#40;!$result&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; echo 'ERROR&amp;#58; Could not run query&amp;#58; '.mysql_error&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; exit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;hr&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;center&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;h1&amp;gt;Invictus Mortem&amp;lt;/h1&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;table border=1&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Race&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Class&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Rank&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Level&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Last Seen&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;tr&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$rows = mysql_num_fields&amp;#40;$result&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;while &amp;#40;$info = mysql_fetch_row&amp;#40;$result&amp;#41;&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; for&amp;#40;$i=0; $i&amp;lt;$rows;$i++&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&amp;nbsp; echo'&amp;lt;td&amp;gt;'.$info&amp;#91;$i&amp;#93;.'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //echo'&amp;lt;td&amp;gt;'.strftime&amp;#40;&amp;quot;%m/%d/%y %H&amp;#58;%M&amp;#58;%S&amp;quot;,$info&amp;#91;$rows&amp;#93;&amp;#41;.'&amp;lt;/td&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; echo'&amp;lt;/tr&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;/table&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;/center&amp;gt;';&lt;br /&gt;
&amp;#125;&lt;br /&gt;
&lt;br /&gt;
// Reads Local Date&lt;br /&gt;
function GetLocalDate&amp;#40;&amp;#41;&lt;br /&gt;
&amp;#123;&amp;nbsp; global $local_timestamp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$q = &amp;quot;SELECT * FROM Census WHERE id=1&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$result = mysql_query&amp;#40;$q&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if &amp;#40;!$result&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; echo 'ERROR&amp;#58; Could not run query&amp;#58; '.mysql_error&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; exit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$info = mysql_fetch_row&amp;#40;$result&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$local_timestamp = $info&amp;#91;1&amp;#93;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if&amp;#40;$info&amp;#91;1&amp;#93;==null&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; echo'First Time Running';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $q = 'UPDATE `Census` SET `date` = &amp;quot;0000000000&amp;quot; WHERE `id` = 1 LIMIT 1';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $result = mysql_query&amp;#40;$q&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;!$result&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&amp;nbsp; echo 'ERROR&amp;#58; Could not run query&amp;#58; '.mysql_error&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $local_timestamp = &amp;quot;00000000&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; echo '&amp;lt;br&amp;gt;Rest Timestamp';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; echo '&amp;lt;br&amp;gt;Local Time Stamp &amp;#58; ' . strftime&amp;#40;&amp;quot;%m/%d/%y %H&amp;#58;%M&amp;#58;%S&amp;quot;,$local_timestamp&amp;#41; . '&amp;lt;br&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; echo 'TimeStamp&amp;#58; '.$info&amp;#91;1&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; echo '&amp;lt;br&amp;gt;Local Time Stamp &amp;#58; ' . strftime&amp;#40;&amp;quot;%m/%d/%y %H&amp;#58;%M&amp;#58;%S&amp;quot;,$local_timestamp&amp;#41; . '&amp;lt;br&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
&lt;br /&gt;
// Reads Remote Date&lt;br /&gt;
function GetRemoteDate&amp;#40;&amp;#41;&lt;br /&gt;
&amp;#123;&amp;nbsp; global $remote_timestamp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$filename = &amp;quot;http&amp;#58;//www.warcraftrealms.com/exports/status.txt&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$infile = fopen &amp;#40;$filename, &amp;quot;r&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if &amp;#40;!$infile&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; echo &amp;quot;&amp;lt;p&amp;gt;REMOTE&amp;#58; Unable to open status file.&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; exit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if&amp;#40;!feof &amp;#40;$infile&amp;#41;&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;&amp;nbsp; &amp;nbsp;$buffer = fgets&amp;#40;$infile, 4096&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $remote_timestamp = trim&amp;#40; $buffer &amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo 'Remote Time Stamp &amp;#58; ' . strftime&amp;#40;&amp;quot;%m/%d/%y %H&amp;#58;%M&amp;#58;%S&amp;quot;,$remote_timestamp&amp;#41; . '&amp;lt;br&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fclose&amp;#40; $infile &amp;#41;;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
&lt;br /&gt;
// Checks Time Stamps and Determines what to do&lt;br /&gt;
function CheckTimeStamps&amp;#40;&amp;#41;&lt;br /&gt;
&amp;#123;&amp;nbsp; global $local_timestamp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;global $remote_timestamp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;br&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'Checking Time Stamps....';&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;br&amp;gt;Local&amp;#58; '.$local_timestamp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;br&amp;gt;Reomote&amp;#58; '.$remote_timestamp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$time = $remote_timestamp - $local_timestamp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;echo'&amp;lt;br&amp;gt;Difference in time strings&amp;#58; '.$time;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if&amp;#40; $time &amp;gt; 43200&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; echo'&amp;lt;br&amp;gt;Update Needed';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; UpdateLocal&amp;#40;$remote_timestamp&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; GetRemoteData&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; GetLocalData&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#123;&amp;nbsp; echo'&amp;lt;br&amp;gt;Update Not Needed';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; GetLocalData&amp;#40;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
&lt;br /&gt;
//ResetLocal&amp;#40;&amp;#41;;&amp;nbsp; &amp;nbsp;// Uncomment for Debugging Only&lt;br /&gt;
GetLocalDate&amp;#40;&amp;#41;;&lt;br /&gt;
GetRemoteDate&amp;#40;&amp;#41;;&lt;br /&gt;
CheckTimeStamps&amp;#40;&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=1103#1103</comments>
                                        <author>Anonymous</author>
                                        <pubDate>Sat Mar 05, 2005 12:10 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=1103#1103</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=1102#1102</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=-1'&gt;Anonymous&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Fri Mar 04, 2005 11:52 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I'm having trouble getting the query statements right.  I am using MySQL version 2.6.1-rc2.  The problem is all the single quotes and appending PHP variables.  Any help would be appreciated.</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=1102#1102</comments>
                                        <author>Anonymous</author>
                                        <pubDate>Fri Mar 04, 2005 11:52 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=1102#1102</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=1101#1101</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=-1'&gt;Anonymous&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Fri Mar 04, 2005 11:24 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Getting Data From Census ServerError unable to select You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=1101#1101</comments>
                                        <author>Anonymous</author>
                                        <pubDate>Fri Mar 04, 2005 11:24 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=1101#1101</guid>
                                      </item>
                                      <item>
                                        <title>Re: Code Using a Database</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=973#973</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=2'&gt;Rollie&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Feb 23, 2005 8:09 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I didn't test this code, but this should do what you need it to, even if there are some unseen syntax errors =)&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $filename = 'http&amp;#58;//www.warcraftrealms.com/exports/guildexport.php?guildid=' . $guild_id; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; $infile = fopen &amp;#40;$filename, &amp;quot;r&amp;quot;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40;!$infile&amp;#41; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &amp;quot;&amp;lt;p&amp;gt;Unable to open remote file.&amp;lt;br&amp;gt;\n&amp;quot;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exit; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; do one read to get the header &lt;br /&gt;
&amp;nbsp; &amp;nbsp; $buffer = fgets&amp;#40;$infile, 4096&amp;#41;; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; read the entries &lt;br /&gt;
&amp;nbsp; &amp;nbsp; while &amp;#40;!feof &amp;#40;$infile&amp;#41;&amp;#41; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $buffer = fgets&amp;#40;$infile, 4096&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; list&amp;#40; $name, $race, $class, $level, $last_seen, $rank &amp;#41; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = explode&amp;#40;&amp;quot;,&amp;quot;,$buffer&amp;#41;; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $query = &amp;quot;SELECT id FROM guild_roster WHERE name = $name&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $result = mysql_query&amp;#40;$query&amp;#41; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;or die &amp;#40;&amp;quot;Error unable to select &amp;quot; . mysql_error&amp;#40;&amp;#41; . &amp;quot; &amp;lt;br /&amp;gt;\n&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;!$result&amp;#41; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; die&amp;#40;'Could not query&amp;#58;' . mysql_error&amp;#40;&amp;#41;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if&amp;#40; ! $row = mysql_fetch_row&amp;#40;$result&amp;#41;&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; there is no entry for this character, so insert&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $query = &amp;quot;INSERT INTO guild_roster &amp;#40; name, race, class, rank, level, last_seen&amp;#41; &amp;quot; .&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;VALUES &amp;#40;$name, $race, $class, $rank, $level, $last_seen&amp;#41;&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mysql_query&amp;#40;$query&amp;#41; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; or die &amp;#40;&amp;quot;Error unable to insert &amp;quot; . mysql_error&amp;#40;&amp;#41; . &amp;quot; &amp;lt;br /&amp;gt;\n&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &amp;quot;Inserting new entry =&amp;gt; $name&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; this character is already present, let's just update him&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $charid = $row&amp;#91;0&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $query = &amp;quot;UPDATE guild_roster SET rank = $rank, level = $level, last_seen = $last_seen WHERE id = $charid&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mysql_query&amp;#40;$query&amp;#41; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; or die &amp;#40;&amp;quot;Error unable to update &amp;quot; . mysql_error&amp;#40;&amp;#41; . &amp;quot; &amp;lt;br /&amp;gt;\n&amp;quot;&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &amp;quot;Updating existing entry =&amp;gt; $name&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; fclose&amp;#40;$infile&amp;#41;; &lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Depending on how you have the indexes set up on the table, you could do it all with a single REPLACE statement.</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=973#973</comments>
                                        <author>Rollie</author>
                                        <pubDate>Wed Feb 23, 2005 8:09 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=973#973</guid>
                                      </item></channel></rss>