如何验证代理地址是否可用  delphi能批量验证最好了 
求解

解决方案 »

  1.   

    放一个HTTP空间funciton checkproxy(add,port:string):boolean;
    var
    b:string;
    i,count:integer;
    begin
    idhttp1.ProxyParams.ProxyServer:=add;
    idhttp1.ProxyParams.ProxyPort:=strtoint(port);
    result:=true;
    try
    memo1.lines.text:=idhttp1.get('http://www.baidu.com/index.php');
    showmessage('代理正常');
    except
    showmessage('代理不存在');
    result:=false;
    end;
    end;
    使用if checkproxy('127.0.0.1','8080')=true then
    showmessage('代理正常');楼主自己看看有米错误。手工写的可能细节上有问题,没delphi不能帮你测试了!