is not a valid integer value delphi问题
我尝试一个 idhttp 访问网站链接的程序
在设置代理端口的时候出错
编译没有错误
就是在运行的时候 出现了
80 is not a valid integer value 的问题
我已经把 函数分类出来的 port 转换为 integer 了 为什么还出错呢
下面是 主要的代码
procedure TForm1.Button1Click(Sender: TObject);//idgttp get 链接地址
var
HTTP: TidHTTP;
html, s: string;
i: integer;
begin
timer3.Enabled:=false;
HTTP := TidHTTP.Create(nil);
try
http.ReadTimeout:=3000;
http.Request.Accept := 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*';
http.Request.AcceptLanguage := 'zh-cn';
http.Request.ContentType := 'application/x-www-form-urlencoded';
http.Request.UserAgent:='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)';
HTTP.HandleRedirects := True;
HTTP.AllowCookies := True;
http.Request.Referer:=edit3.Text; //来路设置
http.ProxyParams.ProxyServer:= edit7.Text; //代理IP
http.ProxyParams.ProxyPort:=strtoint(edit8.Text); //代理端口 这一句对不对???
HTTP.Request.CustomHeaders.Values['Cookie'] := 'abcd';//修改Cookie 抓包可见
html := HTTP.Get(edit5.Text);
s := 'Cookies: ';
if HTTP.CookieManager.CookieCollection.Count > 0 then
for i := 0 to HTTP.CookieManager.Co
相关问答:
求高手帮我转换一下函数,是要得到字节数组:
Delphi版:
InBuf: array[0..2] of byte; //3字节数组
Move(S[1], InBuf, 3) //拷贝S[1]开始的3个到inbuf里
别的语言1:
CString szTmep= ......
已知Python 中:
s = unicode("测试", "gb2312")
s = u'\u6d4b\u8bd5'
print s
测试
在Delphi里面如何将\u6d4b\u8bd5这样的还原成Gb2312的汉字呢?
找到个方法
......
'Select * into '+TempTableName+' from OpenDataSource(''Microsoft.JET.OLEDB.4.0'',''Data Source='
+ExcelFilePath+';Mode=Read;Extended Properties=Ex ......
原文地址:http://hi.baidu.com/sqldebug/blog/item/58a764624a44d74eeaf8f863.html
一、如何限制系统服务和桌面程序只运行一个
如何限制系统服务和桌面程序只运行一个
在工程加入下列代码可以 ......
delphi 函数:
function RB(A: longint): longint;
begin
Result := (A shr 24) or ((A shr 8) and $FF00) or ((A shl 8) and $FF0000) or (A shl 24);
end;
我转成C#:
& ......