[求教]关于vf通过api提交表单
我的代码如下:declare Integer InternetOpen in WinINet.dll string,integer,string,string,integer
DECLARE INTEGER InternetConnect IN wininet.dll INTEGER,STRING,INTEGER,STRING,STRING,INTEGER,INTEGER,INTEGER
declare integer HttpOpenRequest in wininet.Dll integer,string,string,string,string,string,integer,integer
declare HttpSendRequest in wininet.dll integer,string,integer,string,integer
declare InternetCloseHandle in wininet.dll integer
c=null
a=InternetOpen("VFP",1,c,c,0)
b=InternetConnect(a,"202.202.96.53",80,c,c,3,0,0)
e=HttpOpenRequest(b,"post","/login/login1.jsp","http1.1","","*/*",0,1)
post_data="username=xxxx&if_login=Y&password=xxxx"
x=len("username=xxxx&if_login=Y&password=xxxx")
d=HttpSendRequest(e,"",0,post_data,x)
InternetCloseHandle(a)
InternetCloseHandle(b)
InternetCloseHandle(e)
即,我想用用户名xxxx,密码xxxx登陆到服务器
其对应的HTTP请求应该是
post /login/login1.jsp http1.1
host:202.202.96.53
content-type:*/*
username=xxxx&password=xxxx&if_login=Y
但是却实现不了,请问有哪位大哥知道问题在哪儿吗,帮我改改,先谢谢了!