<?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>Wed Jun 19, 2013 3:33 pm</pubDate>
  <lastBuildDate>Wed Jun 19, 2013 3:33 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: Problem !@@</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=6049#6049</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: Mon Nov 28, 2005 8:09 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Curl is a more robust way to download files. The function page for &lt;a href=&quot;http://us3.php.net/manual/en/function.curl-exec.php&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;curl_exec()&lt;/a&gt; gives example usage. Pay particular attention to the note about CURLOPT_RETURNTRANSFER, I've found it to be useful in my scripts.&lt;br /&gt;
&lt;br /&gt;
Here's an example of how I use curl to download my guild roster:&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;$ch = curl_init&amp;#40;&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
curl_setopt&amp;#40;$ch, CURLOPT_URL, &amp;quot;http&amp;#58;//www.warcraftrealms.com/exports/guildexport.php?guildid=$guild_id&amp;quot;&amp;#41;;&lt;br /&gt;
curl_setopt&amp;#40;$ch, CURLOPT_RETURNTRANSFER, true&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
$guild_export_raw = curl_exec&amp;#40;$ch&amp;#41;;&lt;br /&gt;
curl_close&amp;#40;$ch&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
$guild_array = explode&amp;#40;&amp;quot;\n&amp;quot;, $guild_export_raw&amp;#41;;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
Here's print_r($guild_array), truncated:&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;Array&lt;br /&gt;
&amp;#40;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;0&amp;#93; =&amp;gt; CharName,Race,Class,Level,LastSeen,GuildRank,PVPRank&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;1&amp;#93; =&amp;gt; Achilees,Human,Warrior,60,11/25/05,Apprentice,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;2&amp;#93; =&amp;gt; Adelphia,Night Elf,Hunter,48,11/19/05,Squire,000005&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;3&amp;#93; =&amp;gt; Aelias,Night Elf,Hunter,53,11/08/05,Squire,000005&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;4&amp;#93; =&amp;gt; Aesir,Human,Warlock,60,11/21/05,Squire,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;154&amp;#93; =&amp;gt; Zeroflux,Human,Paladin,60,11/22/05,Squire,000006&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;155&amp;#93; =&amp;gt;&lt;br /&gt;
&amp;#41;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
After that, I just foreach() the array and explode() each line.&lt;br /&gt;
&lt;br /&gt;
So,&lt;br /&gt;
&lt;ol type=&quot;1&quot;&gt;&lt;li&gt;Curl downloads files, like fopen().&lt;li&gt;See above. PHP is a full-fledged programming language, if you've never programmed before this will probably be hard.&lt;li&gt;See #1.&lt;/ol&gt;Hope this helps...</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=6049#6049</comments>
                                        <author>Ceto</author>
                                        <pubDate>Mon Nov 28, 2005 8:09 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=6049#6049</guid>
                                      </item>
                                      <item>
                                        <title>Re: Problem !@@</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=6044#6044</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=3006'&gt;credendum&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun Nov 27, 2005 7:17 pm&lt;br /&gt;&lt;br /&gt;
                                      &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;Quote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;&lt;br /&gt;
Also, like Rollie said, it looks like your web server doesn't allow fopen() on URLs. Try using the curl library for PHP: &lt;a href=&quot;http://php.net/curl&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;http://php.net/curl&lt;/a&gt;.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#1 what does a curl library do &lt;br /&gt;
#2 i dont have a clue how to use it never mind what it does&lt;br /&gt;
#3 is there anyway to do this if the server doesn't allow fopen()  thing?</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=6044#6044</comments>
                                        <author>credendum</author>
                                        <pubDate>Sun Nov 27, 2005 7:17 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=6044#6044</guid>
                                      </item>
                                      <item>
                                        <title>Re: Problem !@@</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=6038#6038</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=3006'&gt;credendum&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun Nov 27, 2005 7:01 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      man php is so confusing.. why can't it be easy like html &lt;img src=&quot;images/smiles/icon_sad.gif&quot; alt=&quot;Sad&quot; border=&quot;0&quot; /&gt; lol</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=6038#6038</comments>
                                        <author>credendum</author>
                                        <pubDate>Sun Nov 27, 2005 7:01 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=6038#6038</guid>
                                      </item>
                                      <item>
                                        <title>Re: Problem !@@</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=6029#6029</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: Sat Nov 26, 2005 9:45 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Actually, your problem is twofold. First, you're trying to open the file /status.txt on the server, which is at the root level of the drive. Notice the comments:&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;nbsp; &amp;nbsp; $local_directory = &amp;quot;/&amp;quot;;&amp;nbsp; &amp;nbsp; &amp;nbsp;//&amp;nbsp; this is the directory where your local files&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; will be written to and read from.&amp;nbsp; Make sure&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; you have WRITE priveledges on this directory&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
You may want to change $local_directory to /tmp or something in your home directory, just make sure the directory is writable by the web server.&lt;br /&gt;
&lt;br /&gt;
Also, like Rollie said, it looks like your web server doesn't allow fopen() on URLs. Try using the curl library for PHP: &lt;a href=&quot;http://php.net/curl&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;http://php.net/curl&lt;/a&gt;.</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=6029#6029</comments>
                                        <author>Ceto</author>
                                        <pubDate>Sat Nov 26, 2005 9:45 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=6029#6029</guid>
                                      </item>
                                      <item>
                                        <title>Re: Problem !@@</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=6025#6025</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=3006'&gt;credendum&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Nov 26, 2005 6:16 pm&lt;br /&gt;&lt;br /&gt;
                                      &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;Rollie wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;Looks to me like your host does not allow opening of remote files.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
that stinks.. how i check if it does.. wat would it say on the hosting?</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=6025#6025</comments>
                                        <author>credendum</author>
                                        <pubDate>Sat Nov 26, 2005 6:16 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=6025#6025</guid>
                                      </item>
                                      <item>
                                        <title>Re: Problem !@@</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=6023#6023</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 Nov 26, 2005 4:03 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Looks to me like your host does not allow opening of remote files.</description>
                                        <comments>http://www.warcraftrealms.com/forum/viewtopic.php?p=6023#6023</comments>
                                        <author>Rollie</author>
                                        <pubDate>Sat Nov 26, 2005 4:03 pm</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=6023#6023</guid>
                                      </item>
                                      <item>
                                        <title>Problem !@@</title>
                                        <link>http://www.warcraftrealms.com/forum/viewtopic.php?p=6015#6015</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.warcraftrealms.com/forum/profile.php?mode=viewprofile&amp;u=3006'&gt;credendum&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Nov 26, 2005 10:07 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Well... I used the code and everything for the guild export roster thing... and i get this error on the site:&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;
SecureSSI&amp;#58; Das Script &amp;#40;/usr/export/www/hosting/fireback/roster.php&amp;#41; hat versucht ausserhalb von ihrem Userverzeichniss auf die Datei /status.txt zuzugreifen.&lt;br /&gt;
Dies ist nicht erlaubt!&lt;br /&gt;
&lt;br /&gt;
Warning&amp;#58; fopen&amp;#40;&amp;#41;&amp;#58; Sicherheitsverletzung&amp;#58; in /usr/export/www/hosting/fireback/roster.php on line 32&lt;br /&gt;
&lt;br /&gt;
Warning&amp;#58; fopen&amp;#40;/status.txt&amp;#41;&amp;#58; failed to open stream&amp;#58; Operation not permitted in /usr/export/www/hosting/fireback/roster.php on line 32&lt;br /&gt;
&lt;br /&gt;
No status file available, assuming this is the first run&lt;br /&gt;
&lt;br /&gt;
Warning&amp;#58; fclose&amp;#40;&amp;#41;&amp;#58; supplied argument is not a valid stream resource in /usr/export/www/hosting/fireback/roster.php on line 47&lt;br /&gt;
&lt;br /&gt;
Warning&amp;#58; fopen&amp;#40;&amp;#41;&amp;#58; URL file-access is disabled in the server configuration in /usr/export/www/hosting/fireback/roster.php on line 50&lt;br /&gt;
&lt;br /&gt;
Warning&amp;#58; fopen&amp;#40;http&amp;#58;//www.warcraftrealms.com/exports/status.txt&amp;#41;&amp;#58; failed to open stream&amp;#58; no suitable wrapper could be found in /usr/export/www/hosting/fireback/roster.php on line 50&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unable to open status file.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&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;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and heres the code im using...&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;#91;code&amp;#93;&amp;lt;?php &lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; Rostertest.php &lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; Sample guild export downloader and display &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; You may use this script as you wish.&amp;nbsp; This is only some sample code &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; provided to help get a jumpstart! &lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; Created&amp;#58; 1/27/2005&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; Author&amp;#58;&amp;nbsp; Cooper Sellers aka Rollie - Bloodscalp &lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $local_directory = &amp;quot;/&amp;quot;;&amp;nbsp; &amp;nbsp; &amp;nbsp;//&amp;nbsp; this is the directory where your local files &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; will be written to and read from.&amp;nbsp; Make sure &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; you have WRITE priveledges on this directory &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $guild_id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 505445;&amp;nbsp; &amp;nbsp;//&amp;nbsp; get this number from the link posted on the &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; guilddisplay.php page &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; Remember to check the status file so that you are not pulling data &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; more than once per day &lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; $localstatusfile = $local_directory . &amp;quot;status.txt&amp;quot;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; $infile = fopen &amp;#40;$localstatusfile, &amp;quot;r&amp;quot;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; $current_timestamp = 0; &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;No status file available, assuming this is the first run&amp;lt;br&amp;gt;&amp;quot;; &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; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; read our status file time &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $buffer = fgets&amp;#40;$infile, 4096&amp;#41;; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $current_timestamp = trim&amp;#40; $buffer &amp;#41;; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo 'Local status file reads &amp;#58; ' . strftime&amp;#40;&amp;quot;%m/%d/%y %H&amp;#58;%M&amp;#58;%S&amp;quot;,$current_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;;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//&amp;nbsp; close our local status file &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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;;&amp;nbsp; &amp;nbsp;// open remote status file &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 status file.&amp;lt;br&amp;gt;&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; $remote_timestamp = 0; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; if&amp;#40;!feof &amp;#40;$infile&amp;#41;&amp;#41;&amp;nbsp; &amp;nbsp;// only 1 read should be needed for the status file &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; $remote_timestamp = trim&amp;#40; $buffer &amp;#41;; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo 'Remote status file reads &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;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; fclose&amp;#40; $infile &amp;#41;;&amp;nbsp; //&amp;nbsp; close the remote status file &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if&amp;#40; $remote_timestamp - $current_timestamp &amp;gt; 86400 &amp;#41; //&amp;nbsp; 1 day = 60*60*24 &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; We can do a full get &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; write our new status file &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $outfilename = $local_directory . &amp;quot;status.txt&amp;quot;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $outfile = fopen&amp;#40;$outfilename, &amp;quot;w&amp;quot;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if&amp;#40; !$outfile &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; echo &amp;quot;&amp;lt;p&amp;gt;Unable to open save file =&amp;gt; &amp;quot; . $outfilename . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exit; &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; fputs&amp;#40;$outfile, $buffer&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fclose&amp;#40;$outfile&amp;#41;; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; Now get our guild roster file &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $filename = 'http&amp;#58;//www.warcraftrealms.com/exports/guildexport.php?guildid=505445' . $guild_id; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $infile = fopen &amp;#40;$filename, &amp;quot;r&amp;quot;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;!$infile&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; 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; &amp;nbsp; &amp;nbsp; exit; &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; $outfilename = $local_directory . &amp;quot;guildroster.csv&amp;quot;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $outfile = fopen&amp;#40;$outfilename, &amp;quot;w&amp;quot;&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if&amp;#40; !$outfile &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; echo &amp;quot;&amp;lt;p&amp;gt;Unable to open save file =&amp;gt; &amp;quot; . $outfilename . &amp;quot;&amp;lt;br&amp;gt;\n&amp;quot;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exit; &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; while &amp;#40;!feof &amp;#40;$infile&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; $buffer = fgets&amp;#40;$infile, 4096&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fputs&amp;#40;$outfile, $buffer&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; fclose&amp;#40;$outfile&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fclose&amp;#40;$infile&amp;#41;; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; Now let's just output our roster as it's given &lt;br /&gt;
&amp;nbsp; &amp;nbsp; // &lt;br /&gt;
&amp;nbsp; &amp;nbsp; $filename = $local_directory . &amp;quot;guildroster.csv&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; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &amp;quot;&amp;lt;p&amp;gt;Unable to open local roster file.&amp;lt;br&amp;gt;&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; echo '&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Race&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Class&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Level&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Last Seen&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Rank&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;'; &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; = explode&amp;#40;&amp;quot;,&amp;quot;,$buffer&amp;#41;; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &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;' . $level . '&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' . $last_seen . '&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' . $rank . '&amp;lt;/td&amp;gt;&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;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; don't forget our credit link =&amp;#41; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; echo &amp;quot;Guild data provided by &amp;lt;a href='http&amp;#58;//www.warcraftrealms.com/'&amp;gt;WarcraftRealms.com&amp;lt;/a&amp;gt;.&amp;quot;; &lt;br /&gt;
?&amp;gt;&amp;#91;/code&amp;#93;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
help please &amp;#58;&amp;#40;&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=6015#6015</comments>
                                        <author>credendum</author>
                                        <pubDate>Sat Nov 26, 2005 10:07 am</pubDate>
                                        <guid isPermaLink="true">http://www.warcraftrealms.com/forum/viewtopic.php?p=6015#6015</guid>
                                      </item></channel></rss>