<%
	Set Fso = Server.CreateObject("scripting.FileSystemObject")
	If Fso.FileExists(Server.MapPath("../fy_inc/Install.lock")) Then Response.write "err" : Response.End
	Call SaveFile()
	Function SaveFile()
		Dim SaveRemoteFile:SaveRemoteFile=True
		dim Ads,Retrieval,GetRemoteData
		Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
		With Retrieval
			.Open "Get", "http://www.fycms.com/demodata/data.txt", False, "", ""
			.Send
			If .Readystate<>4 then
				SaveRemoteFile=False
				Exit Function
			End If
		GetRemoteData = .ResponseBody
		End With
		Set Retrieval = Nothing
		Set Ads = Server.CreateObject("Adodb.Stream")
		With Ads
			.Type = 1
			.Open
			.Write GetRemoteData
			.SaveToFile server.MapPath("demodata.txt"),2
			.Cancel()
		If  .size >1000 Then 
			Response.write "OK"
		Else 
			Response.write "err"
		End If 
		.Close()
		End With
		Set Ads=nothing
	
	End Function
	'

%>