General information
Category:
Active Server Page
This will do what you want:
< %
Dim cName, oFS, cFile
Set oFS = Server.CreateObject("Scripting.FileSystemObject")
cName = "\\COMPUTER\ShareName\TextFile.TXT"
If oFS.FileExists(cName) = False Then
Response.write "The server is not available (Server IP Address file is missing). Please try again."
Else
Set cFile = oFS.OpenTextFile(cName,1)
cAddress = cFile.Read(25) ' Read 25 characters from file
Response.Redirect ("http://" & cAddress)
cFile.Close
end if
% >
Note: Remove the spaces from < % and % >
-Ed
>In my case the port 80 is not block. Yes I like to see some code posted about this. Thank You Ed.
>
>>If your using ASP, you can keep the IP address in a file and put together a response.redirect message
>>with the latest IP address in it automatically (I can post code if this is an option). Also, many cable modem providers block port 80 to
>>prevent this kind of thing, is that an issue in your case?
>>
>>
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only