<%@ LANGUAGE=VBScript LCID=1033%>
<%
' Utility sample for Aspicore GSM Tracker
' Show URL arguments as plain text and stores data into text file
' This sample demonstrates, how Aspicore GSM Tracker sends location data to the server via HTTP.
' Usage: Set "Internet page URL" in Aspicore GSM Tracker settings to point to this page.
' You see the output in your phone in the Info tab every time the phone sends
' some location data to the server via a HTTP connection.
' (c) Aspicore Ltd 2005, www.aspicore.com
' Tested with Windows XP, IIS ASP 5.1 and Windows 2000, IIS ASP 5.0
' ------------------------------
' Change History:
' 2005-04-13 jje - Script created
%>
<% Option Explicit
Response.Buffer = True
Response.ContentType = "text/plain; charset=ISO-8859-1"
Response.Expires = 0
' Response.LCID = 1033 ' Windows 2000 does not support this, so replaced by the following line
Session.LCID = 1033 ' Geographical locale telling how to format dates and times, 1033 = English - US
' Show time and arguments in the response to the HTTP client
Response.Write Now() & vbCrLf
Dim item
For Each item In Request.QueryString
Response.Write item & " => " & Request.QueryString(item) & vbCrLf
Next
Response.Write vbCrLf
' Write time and arguments to the ASCII text file
Dim fsoObject ' FileSystemObject
Dim tsObject ' TextStream object
Dim filename
Const ForAppending = 8
Const TristateFalse = 0
Const TemporaryFolder = 2
Set fsoObject = Server.CreateObject( "Scripting.FileSystemObject" )
filename = fsoObject.GetSpecialFolder(TemporaryFolder) & "\storedata.txt"
Set tsObject = fsoObject.OpenTextFile(filename, ForAppending, True) ' Create, if necessary
tsObject.WriteLine
tsObject.WriteLine FormatDateTime(Now()) ' Use FormatDateTime to obey LCID setting above
For Each item In Request.QueryString
tsObject.WriteLine item & " => " & Request.QueryString(item)
Next
tsObject.Close
' Show message in the response to the HTTP client
Response.Write "Appended " & filename & vbCrLf
%>