<%@LANGUAGE="VBScript" CODEPAGE="65001"%>
<%
Session.CodePage=65001
Response.Charset="utf-8"


imgpath=Request.QueryString("url")
imgwidth=Request.QueryString("imgw")
If imgwidth="" Or Not IsNumeric(imgwidth) Then imgwidth=0
If imgwidth<=0 Then imgwidth=280
imgwidth=Cint(imgwidth)

set mXmlHttp = Server.CreateObject("Msxml2.XMLHTTP")
mXmlHttp.open "GET",imgpath,false
mXmlHttp.send strPostData
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.OpenBinary(mXmlHttp.responseBody)
IF Jpeg.OriginalWidth>imgwidth Then Jpeg.Width=imgwidth:Jpeg.Height=Round( Jpeg.OriginalHeight * (imgwidth/Jpeg.OriginalWidth) )
Response.ContentType = "image/jpeg":Jpeg.Quality=80:Jpeg.SendBinary
Set Jpeg = Nothing
Set mXmlHttp=Nothing

%>