我写了个http://127.0.0.1/send.aspx页面通过http接收数据,
比如用户 这样访问:http://127.0.0.1/send.aspx?circle=csdn2006&pwd=csdncscn.
如果有的用户是恶意访问这个页面,就是说通过循环不停的访问这个页面,那我的这个页面就不能接收数据了,有的时候要重起iis。
那位大虾能指点一下,要怎样在send.aspx这个页面限制用户不停的访问,我小弟在这里跪谢了
比如用户 这样访问:http://127.0.0.1/send.aspx?circle=csdn2006&pwd=csdncscn.
如果有的用户是恶意访问这个页面,就是说通过循环不停的访问这个页面,那我的这个页面就不能接收数据了,有的时候要重起iis。
那位大虾能指点一下,要怎样在send.aspx这个页面限制用户不停的访问,我小弟在这里跪谢了
解决方案 »
- 求 用Repeater读取excel文件内容 并且 指定列导出
- 未登陆的定时邮件提醒怎么做呢,
- ajax联动,取不到第二个dropdownlist选择的值,求助。。
- 用javascript写自定义类,如何定义只读属性,方法如何内部调用?
- asp.net中ACTIVEREPOT报表的问题
- 编码问题谢谢回答
- 问个javascript的简单问题
- 请教:不能使用 '';文件已在使用中
- 请帮我看看这段程序是什么意思
- 如何在调试时跟踪进同一解决方案中的组件项目
- 如何判断要连接的静态页面是否存在
- 大家来交流以下.从Windwos转过来的.最近开始学ASP.net.发现做ASP.net精力全都花在界面上了.似乎学界面设计比写程序重要,逻辑代码没写多少
import java.io.*;
import java.util.*;
import java.lang.*;
import java.sql.*;
//import alading.cn.BaseDB;public class HttpSend{
public static void main(String[] args){
/* try{
BaseDB db = new BaseDB();
String phone,msgContent;
String str = "{call Proc_MT_tsxx}" ;
while (true){
ResultSet rs = db.ExecuteNonProcdure(str);
while(rs.next()){
phone = rs.getString("cPhone");
msgContent = rs.getString("cMsgContent");
System.out.println(getHTML("http://218.66.49.193/Smsclientinterface/send.asp?circle=shineyo&pwd=shineyo2006&mobile=" + phone + "&message=" + msgContent + "&cell=3668"));
}
Thread.sleep(20000);
}
}catch (Exception e){
System.out.println("错误");
}*/
System.out.println(getHTML("http://127.0.0.1/wt/send.aspx?circle=shineyo&pwd=shineyo2006&msgcontent=你好&spnumber=09520&mtLink=123456789"));
/* while (true){
try{
System.out.println(getHTML("http://127.0.0.1/wt/send.aspx?circle=shineyo&pwd=shineyo2006&msgcontent=你好&spnumber=09520&mtLink=123456789"));
}catch (Exception e){
System.out.println("错误");
}
// Thread.sleep(20000);
}*/
} /**
* 根据URL获取HTML
* @param str URL字符串
* @return 页面的HTML
*/
public static String getHTML(String str) {
String strret = null;
URL rTmp = null;
InputStream ins = null;
BufferedReader breader = null;
InputStreamReader isreader = null;
try {
rTmp = new URL(str);
ins = rTmp.openStream();
isreader = new InputStreamReader(ins);
breader = new BufferedReader(isreader);
String info = breader.readLine();
strret = info;
info = breader.readLine();
while (info != null) {
strret = strret + "\n" + info;
info = breader.readLine();
}
} catch (Exception e) {
e.printStackTrace(System.err);
return null;
} finally {
try {
if (breader != null) {
breader.close();
}
} catch (IOException ex) {
} try {
if (isreader != null) {
isreader.close();
}
} catch (IOException ex1) {
} try {
if (ins != null) {
ins.close();
}
} catch (IOException ex2) {
}
}
return strret;
}
}