发送本机ip IdHTTP1.Get('http://www.sy114114.com/zlnip.asp');
得到 本机 ip serverip:=IdHTTP1.Get('http://www.sy114114.com/data/zln.txt');
asp的内容
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<%
cip=Request.ServerVariables("REMOTE_ADDR"
%>
<body>
cip=<%=cip%>
<%
Dim fso, f1, ts, s,strsql
Const ForReading = 1
Set fso = CreateObject("Scripting.FileSystemObject"
Set f1 = fso.CreateTextFile(server.mappath("data/zln.txt"
, True)
' 写一行。server.mappath("data/bfxx.mdb"
'Response.Write "Writing file <br>"
f1.WriteLine cip
f1.WriteBlankLines(1)
f1.Close
' 读取文件的内容。
'Response.Write "Reading file <br>"
Set ts = fs
penTextFile(server.mappath("data/zln.txt"
, ForReading)
s = ts.ReadLine
'Response.Write "File contents = '" & s & "'"
ts.Close
%>
</body>
</html>