http://11.11.11.11/code.aspx?product=33のようなページの内容を取得する必要がありますが、ip:22.22.22.22だけがそのファイルにアクセスできます。したがって、他のサーバーのpics.aspxファイルから実行する必要がありますhttp://22.22.22.22/pics.aspx?code=33asp.netで外部ページのコンテンツを取得するには?
これまでのところ、このスクリプトを使用して?code=33
を取得できます。今私がしなければならないのは、http://11.11.11.11/code.aspx?product=subKeys(Counter2)
の内容を取り出すことです。私は過去にPHPで働いていたので、私がASPで何をやっているのか分かりません。あなたはそのURLを介して他のページの内容を取得する方法についての私の少しを導くことができれば、それははるかに高く評価されるだろう:)
<%@ Page Language="vb" %>
<html>
<head>
<title>Showing QueryString values via the QueryString Collection in ASP.NET</title>
</head>
<body>
<%
Dim Counter1, Counter2 As Integer
Dim Keys(), subKeys() As String
Dim MyQueryStringCollection As NameValueCollection
MyQueryStringCollection=Request.QueryString
Keys = MyQueryStringCollection.AllKeys
For Counter1 = 0 To Keys.GetUpperBound(0)
subKeys = MyQueryStringCollection.GetValues(Counter1) ' Get all values under this key.
If Keys(Counter1)="code" Then
Response.Write("Counter is "& Keys(Counter1) & "<br>" & subKeys(Counter2))
End If
subKeys = MyQueryStringCollection.GetValues(Counter1) ' Get all values under this key.
For Counter2 = 0 To subKeys.GetUpperBound(0)
' Response.Write("Value " & CStr(Counter2) & ": " & subKeys(Counter2) & "<br>")
Next Counter2
Next Counter1
%>
</body>
</html>
私は 'include'のようなものをPHPで探しています – Logan