Doctor Archive

Thread: Medical Resource Filtering for SWGCraft.com

Scoooter
Tue Feb 03, 2004 8:39 am
#14

Great Job


Just have one question?


What is the data latency. Is this done trough their xml files, if so how often is the site and the XML files updated, or are you doing on line access and always have the latest posts there






Scoooter - Master Pilot/Master Politician
ScootBacca - Master Creature Handler/Master Rifleman
Co-Leader - mVa
Mayor of Mos Vegas, Tatooine, Valcyn
Agent001
Tue Feb 03, 2004 12:36 pm
#15






Scoooter wrote:

Great Job


Just have one question?


What is the data latency. Is this done trough their xml files, if so how often is the site and the XML files updated, or are you doing on line access and always have the latest posts there




yes this is done through the data export function on SWGcraft.com (im actually using the CSV files, since they are more database friendly)


The data at this point is manually refreshed by myself, usually twice a day, once in the morning, and once when I get home from work. I will be adding in a date comparison script eventually that will automatically retrieve the newest data when someone loads the page after so much time has gone by since the last refresh.


If anyone has any suggestions or things they would like to see, please let me know.
TheGrifted1
Tue Feb 03, 2004 12:46 pm
#16

Hey Agent, I'm getting this error when I go to the page

SWGCraft.com - Kettemoor Medical Resources - Last Updated 2/3/2004 7:45:22 AM

Doctor Advanced Subcomponents

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '|'. It is already opened exclusively by another user, or you need permission to view its data.

/medresources/medicalresources.asp, line 34



_::= Major V'anity =::_
The Aldera Sect
=::_::=::_::=::_::=::_::=::_::=::_::=
Rugs
Tue Feb 03, 2004 1:01 pm
#17

That is some fantastic work.



Rugs Hiloitaca, MDoctor, MFencer
Tempest
"Quitters never win, winners never quit. But those who never win and never quit are idiots."
- www.despair.com/stup24x30pri.html
ImpKleaner
Tue Feb 03, 2004 1:56 pm
#18

Awsome. I'll be checking this regulary



---------------------------------------------------------------------
Proud Member of DARK Legion
Kleaner - Combat Medic / Doctor
Kleanex - Master Politican - Mayor of DARK City
Kynin
Tue Feb 03, 2004 2:03 pm
#19

Sooooo you got bored did you God decided to play swg with the rest of us mortals huh


good job man fantastic work


Agent001
Tue Feb 03, 2004 2:22 pm
#20






NasrikSnar wrote:





Agent001 wrote:

The data at this point is manually refreshed by myself, usually twice a day, once in the morning, and once when I get home from work. I will be adding in a date comparison script eventually that will automatically retrieve the newest data when someone loads the page after so much time has gone by since the last refresh.


If anyone has any suggestions or things they would like to see, please let me know.




Are you uploading the .csv file into a database? I'm trying to figure out how to automate that right now.





no, I have a PhP script that downloads and unzips the csv file automatically to the server, then I have a MS Access database that i tricked intocreating an external table link, so it runs just as if the CSV data was inside the Database (except its a lot slower). Im working on writing a script that reads each line of the CSV file directly into a table on teh database, but that will take some time to code, since i cant find a good example script anywhere to steal from, and will have to code it all by hand.

NasrikSnar
Tue Feb 03, 2004 2:50 pm
#21








Agent001 wrote:


no, I have a PhP script that downloads and unzips the csv file automatically to the server






Are you running a component on your webserver to unzip the .gz file? My website is running on a shared server, so I'm not able to install components myself. I'm having to unzip it manually right now.
Jenna
Tue Feb 03, 2004 3:04 pm
#22

Most impressive.






___________________________________

Dr. Kinua Al'Dara
Master Doctor
___________________________________
Davy
Tue Feb 03, 2004 3:15 pm
#23

Great job!





Lei'lu, Elder Light Jedi

(gnn[[[[[[[[[[]nnnWX9ggggggggggggggggggggggggggggg)

Cassiopia Zorrak - DZ Crafts & Armor
Riverlands, Corellia

Agent001
Tue Feb 03, 2004 3:36 pm
#24






NasrikSnar wrote:








Agent001 wrote:


no, I have a PhP script that downloads and unzips the csv file automatically to the server







Are you running a component on your webserver to unzip the .gz file? My website is running on a shared server, so I'm not able to install components myself. I'm having to unzip it manually right now.





If your server has PhP support, then is "should" have support for unxipping gzib files. Only the Windows version of PhP server does not have built in support.


the script you would look something like:


<?
$out = fopen("./currentresources.csv", "w");


$in = gzopen("http://www.swgcraft.com/sendfile.php?file=currentresources.csv.gz", "r");
while(!gzeof($in)) {
$buffer = gzgets($in, 4096);
fputs($out, $buffer);
}
gzclose($in);


fclose($out);
?>


This will unzip the csv file into the same directory as the script


Thrail
Tue Feb 03, 2004 4:37 pm
#25

The force is strong with this one.



Thrail Krii'tak, retired as of 12-27-05
aka Thrakzal and Thrael, Hellscream, you-know-where
Wulfheir
Tue Feb 03, 2004 4:46 pm
#26

Excellent work,thanks!



www.wulfheir.com
Page 2 of 6