% Sub saveDataFile() url = "http://www.lfsworld.net/pubstat/get_stat2.php?action=pst&racer=abz1" set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") xmlhttp.open "GET", url, false xmlhttp.send "" text = xmlhttp.responseText if temp <> "can't reload this page that quickly after another" then strFile = Server.MapPath("lfs_data.txt") set TEMPfs=Server.CreateObject("Scripting.FileSystemObject") set TEMPf=TEMPfs.OpenTextFile(strFile, 2, True) TEMPf.Writeline Date TEMPf.Writeline text TEMPf.Close Set TEMPf=Nothing Set TEMPfs=Nothing End if set xmlhttp = nothing End Sub Set fs=Server.CreateObject("Scripting.FileSystemObject") Set f=fs.OpenTextFile(Server.MapPath("lfs_data.txt"), 1) dat =CDate(f.ReadLine) if Date > dat then saveDataFile() end if temp =f.ReadAll arr = split(temp,Chr(10)) f.Close Set f=Nothing Set fs=Nothing %>
LFS Stats |
|
Distance: |
<% temp = arr(0) * 0.000621371192 'roundup distance = Int(temp)+ 1 response.write(distance & " Miles")%> |
Fuel burnt: |
<% feul = arr(1)/100 response.write(feul & " Ltr")%> |
Laps: |
<%=arr(2)%> |
Hosts joined: |
<%=arr(3)%> |
Won: |
<%=arr(4)%> |
Two: |
<%=arr(5)%> |
Three: |
<%=arr(6)%> |
Finished: |
<%=arr(7)%> |
Qual: |
<%=arr(8)%> |
Pole: |
<%=arr(9)%> |
Credits: |
<%=arr(10)%> |
Drags: |
<%=arr(11)%> |
Drag Wins: |
<%=arr(12)%> |