Thema: Delphi IdHttp und proxy

Einzelnen Beitrag anzeigen

Benutzerbild von ghost007
ghost007

Registriert seit: 31. Okt 2005
Ort: München
1.024 Beiträge
 
Delphi 7 Personal
 
#14

Re: IdHttp und proxy

  Alt 30. Okt 2008, 22:57
Zitat von x000x:
Delphi-Quellcode:
var
   szTmp1,szTmp2 : String;
begin
   IdHTTP1.Request.ProxyServer := '213.4.106.85';
   IdHTTP1.Request.ProxyPort := 8080;
   szTmp1 := IdHTTP1.Get('http://2host.de/');
   szTmp1 := Copy(szTmp1, Pos('<BIG>[B]',szTmp1)+8,40);
   szTmp1 := Copy(szTmp1, 1, Pos('[/B]',szTmp1)-1);

   IdHTTP1.Request.ProxyServer := '';
   IdHTTP1.Request.ProxyPort := 0;
   szTmp2 := IdHTTP1.Get('http://2host.de/');
   szTmp2 := Copy(szTmp2, Pos('<BIG>[B]',szTmp2)+8,40);
   szTmp2 := Copy(szTmp2, 1, Pos('[/B]',szTmp2)-1);
   memo1.lines.text := 'Deine IP ohne Proxy: ' + szTmp1 + #13#10+
                       'Deine IP mit Proxy: ' + szTmp2;
end;
Das funktioniert... Zeigt dir auch die IPs an

[EDIT]
Hab grade festgestellt, dass ich hier nur Indy 8.xx installiert hab... Sorry
[/EDIT]
stimmt fast ^^ nur die IPs sind vertauscht danke - erledigt
Christian
Es gibt möglich Dinge und unmöglich Dinge.
Für unmögliche braucht man lediglich etwas länger.
  Mit Zitat antworten Zitat