% Dim URL, newDomein URL = Request.ServerVariables("SERVER_NAME") newDomein = Replace(URL,"www.","") newDomein = Replace(newDomein,".nl","") newDomein = Replace(newDomein,".com","") 'here we set up a connection to the txt file using a physical path Set oFSO = Server.CreateObject("Scripting.FileSystemObject") If newDomein = "oudejans" Then ' Set oFile = oFSO.OpenTextFile("D:\www\213.201.235.80\o-r\oudejans.com\database\counter.txt") Set oFile = oFSO.OpenTextFile("D:\www\213.247.55.71\m-n-o\oudejans.com\database\counter.txt") Else Set oFile = oFSO.OpenTextFile("I:\Data\M-N-O\O\Oudejans\www.oudejans.comm\www\database\counter.txt") End If 'now we read the number in the file oldNum = CLng(oFile.ReadLine) 'and we close oFile.Close 'we add one to the number oldNum = oldNum + 1 'we open the file to overwrite the new number to it If newDomein = "oudejans" Then ' Set oFile = oFSO.OpenTextFile("D:\www\213.201.235.80\o-r\oudejans.com\database\counter.txt",2,true) Set oFile = oFSO.OpenTextFile("D:\www\213.247.55.71\m-n-o\oudejans.com\database\counter.txt",2,true) Else Set oFile = oFSO.OpenTextFile("I:\Data\M-N-O\O\Oudejans\www.oudejans.comm\www\database\counter.txt",2,true) End If 'and we overwrite it here oFile.WriteLine(oldNum) 'and we close the file again oFile.Close 'now we use the number for our display strCount = oldNum %>