我想做个小工具 就是在我软件中输入用户名和密码就可以登录到该网站上
该网站的网址是 http://211.147.222.40:8686/SMSPortal/
该网站的源代码是
<html>
<head>
<title>短信管理</title>
</head>
<body text="black" link="green" vlink="green" background="image/bk.gif" onload="document.form1.name.focus()">
<center>
<form action="manager" method="post" name="form1">
<table border="0" align="center" bordercolor="#000000">
<tr><td><img src="image/banner.gif"></td></tr>
<tr><td><div align="center"><strong><font color="#000000">用户:</font></strong><input name="name" type="text" size="20" maxlength="20"></div></td></tr>
<tr><td><div align="center"><strong><font color="#000000">密码:</font></strong><input name="pwd" type="password" size="20" maxlength="20"></div></td></tr>
<tr><td><div align="center"><strong><input type="submit" value="登录"> <input type="reset" value="取消"></strong></div></td></tr>
</table>
</form>
</center>
</body>
</html>高手帮忙 很急
该网站的网址是 http://211.147.222.40:8686/SMSPortal/
该网站的源代码是
<html>
<head>
<title>短信管理</title>
</head>
<body text="black" link="green" vlink="green" background="image/bk.gif" onload="document.form1.name.focus()">
<center>
<form action="manager" method="post" name="form1">
<table border="0" align="center" bordercolor="#000000">
<tr><td><img src="image/banner.gif"></td></tr>
<tr><td><div align="center"><strong><font color="#000000">用户:</font></strong><input name="name" type="text" size="20" maxlength="20"></div></td></tr>
<tr><td><div align="center"><strong><font color="#000000">密码:</font></strong><input name="pwd" type="password" size="20" maxlength="20"></div></td></tr>
<tr><td><div align="center"><strong><input type="submit" value="登录"> <input type="reset" value="取消"></strong></div></td></tr>
</table>
</form>
</center>
</body>
</html>高手帮忙 很急
解决方案 »
- ClientdataSet过滤时的奇怪问题?
- 500分求助,delphi里用standred来配置dbf文件
- 请高手进来看看这个奇怪的问题,在线等待中 困惑2周的问题大家帮帮小女子:cdgrid
- isapi+dbisam iis 运行报错 求高人指点
- SQL 的问题
- 一个"全局变量"设置问题!
- 求Delphi5注册码(急,等待中)
- 奇怪!怎么不能创建新的窗体了?
- 那位仁兄知道DELPHI COM 方面的书籍下载?
- 请问delphi5.0的补丁程序在哪有下载!
- delphi程序运行后,还可以进入设计器调整窗体界面字段的属性
- 在webbrowser中执行js语句,不能进行 多行文本的赋值,如何解决?
如果仅仅是为了处理这个登录网页,你完全可以使用IdHttp控件封装一个数据包发到这个网址上进行登录,当然之后的所有操作都需要用IdHttp来进行封包解包处理;或者直接内嵌一个WebBrowser控件来自己构建一个简易浏览器;
var
postList:TStrings;
htmltext:ansistring;
begin
postList:=TStringList.Create;
postList.Add('name='+edit1.text); //edit1为用户名
postList.Add('pwd='+edit2.text); //edit2为密码
try
with IdHTTP1 do
begin
Host:='211.147.222.40:8686';
get('http://211.147.222.40:8686/SMSPortal/');
// Request.Referer:='http://211.147.222.40:8686/SMSPortal/';
htmltext:=Post('/SMSPortal/manager',postList);
end;
finally
postList.free;
end;
showmessage(htmltext);
end;
每次执行什么就用Visual Sniffer截获下发送的消息,然后用idhttp照着发就行了我都是这么做的
<head>
<title>短信管理</title>
</head>
<frameset rows="10%,90%" framespacing="0"><frame src="logo.jsp" name="logo"><frameset cols="15%,85%" framespacing="0"><frame src="menu.jsp"><frame src="welcome.jsp" name="manager"></frameset></frameset>
</html>其中的的查询是点name=“logo”然后就跑出一个表格 请问我该如何用dilphi实现点这个logo以及如何获取表格的数据呢 谢谢
你试试在之前的代码后面继续加上:
postList.clear;
postList.Add('name=logo');
try
htmltext:=IdHTTP1.Post('/welcome.jsp',postList);
finally
postList.free;
end;
showmessage(htmltext);
end;
如果你用Visual Sniffer的话可以很直观的看出需要post什么内容