ソース掲示板




すべてから検索

キーワード   条件 表示 現行ログ 過去ログ トピックス 名前 本文

  メンテナンス 前画面に戻る

対象スレッド 件名: Web ページの中継表示
名前: lightbox
処理選択
パスワード

件名 Web ページの中継表示
名前 lightbox
コメント
@DIV
<%
Response.ExpiresAbsolute=#May 31,2000 23:59:59#

Dim strMessage

' **********************************************************
' MODEL
' **********************************************************
function DispPage()

	if Trim( Request.Form("url") ) = "" then
		strMessage = "URL を入力して下さい"
		Exit Function
	end if

	Set Http = Server.CreateObject("Msxml2.ServerXMLHTTP")
	on error resume next
	Call Http.Open("GET", Request.Form("url"), False )
	if Err.Number <> 0 then
		strMessage = "URL に誤りがあります"
		Exit Function
	end if
	on error goto 0

	Http.Send

	Response.BinaryWrite Http.responseBody
	Response.End

end function

' **********************************************************
' CONTROL
' **********************************************************
	if Request.Form( "send" ) = "表示" then
		Call DispPage()
	end if

%>

<!-- **********************************************************
  VIEW
*********************************************************** -->
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=Shift_JIS">
</HEAD>
<FORM method=POST>
表示するWebページの URL
<INPUT
	size=100
	type=text
	name=url
	value="<%= Request.Form( "url" ) %>">
<INPUT type=submit name=send value="表示">
<HR>
<%= strMessage %>
</FORM>
@END