Doctor Archive
Thread: Medical Resource Filtering for SWGCraft.com
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 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.
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
Sooooo you got bored did you God
decided to play swg with the rest of us mortals huh
good job man fantastic work
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 wrote:
Are you uploading the .csv file into a database? I'm trying to figure out how to automate that right now.
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.
Agent001 wrote:
no, I have a PhP script that downloads and unzips the csv file automatically to the server
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