# Re: 请问为何Inet.Exec无法将附带的资料送到远端Asp主机

Posted by Maxwell on July 15, 1998 at 23:41:24:

In Reply to: 请问为何Inet.Exec无法将附带的资料送到远端Asp主机 posted by 小郭 on July 10, 1998 at 11:28:12:

大众、中华、ALPHACALL 的程式我都写过,大众可以用 OPENURL 就可以直接在后面加上参数, ALPHA CALL 必须要用 POST 的方式送出资料, 因此, 你必须要 "模拟" 浏览器送出表单的方式, 除了 URL 跟 DATA 外, 浏览器还会送出 HEAD 资料, 因此你可以加下列 HEAD 资料, 然后在 INET.EXEC 上使用 HEAD 的参数就可以了:

DIM URL AS STRING
DIM SETDATA AS STRING
DIM SETHEAD AS STRING

URL="位置"
SETDATA="参数"

SETHEAD = "Accept: www/source" & vbCrLf & _
"Accept: text/html" & vbCrLf & _
"Accept: text/plain" & vbCrLf & _
"User-Agent: Mozilla/3.0" & vbCrLf & _
"Content-type: application/x-www-form-urlencoded" & vbCrLf & _
"Content-length: " & Len(SETDATA) & vbCrLf

Inet1.Execute URL, "POST", SETDATA, SETHEAD

Follow Ups:

- Re: 请问为何Inet.Exec无法将附带的资料送到远端Asp主机 小郭 22:42:48 7/20/98 (0)