Delphi IdHTTP访问路由里的Web


RStream := TStringStream.Create('');

self.IdHTTP1.Request.Host := '192.168.3.198';
self.IdHTTP1.Request.UserAgent := 'Mozilla/5.0 (Windows; U; Windows NT 6.1 zh-CN; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10';
self.IdHTTP1.Request.Accept := 'text/html,application/xhtml+xml, application/xml;q=0.9,*/*;q=0.8';
self.IdHTTP1.Request.AcceptLanguage := 'zh-cn,zh,q=0.5';
self.IdHTTP1.Request.AcceptEncoding := 'gzip,deflate';
self.IdHTTP1.Request.AcceptCharSet := 'GB2312,utf-8;q=0.7,*;q=0.7';
self.IdHTTP1.Request.Connection := 'keep-alive';
self.IdHTTP1.Request.BasicAuthentication := true;
self.IdHTTP1.Request.Username := 'admin';
self.IdHTTP1.Request.Password := 'voip';
self.IdHTTP1.Request.Referer := 'http://192.168.3.198/submenu.htm';

self.IdHTTP1.Get('http://192.168.3.198/main.htm', RStream);
self.Memo1.Text := RStream.DataString;
联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678