Einzelnen Beitrag anzeigen

Lestat

Registriert seit: 25. Apr 2006
14 Beiträge
 
#5

Re: Proxyeinstellungen aus dem Internet Explorer auslesen

  Alt 24. Jul 2006, 14:49
So habe es weiter getestet, habe den Source jetzt so modifiziert verwendet...

Delphi-Quellcode:
var
  aHTTP : TIdHTTP;
  ProxyInfo: PInternetProxyInfo;
  Len: LongWord;
begin

  Len := 4096;
  GetMem(ProxyInfo, Len);
  try
    if InternetQueryOption(nil, INTERNET_OPTION_PROXY, ProxyInfo, Len) then
      if ProxyInfo^.dwAccessType = INTERNET_OPEN_TYPE_PROXY then
      begin
        aHTTP.ProxyParams.ProxyServer := copy(ProxyInfo^.lpszProxy,0,pos(':',ProxyInfo^.lpszProxy)-1);
        aHTTP.ProxyParams.ProxyPort := StrToInt(copy(ProxyInfo^.lpszProxy,pos(':',ProxyInfo^.lpszProxy)+1,10));
      end
  finally
    FreeMem(ProxyInfo);
  end;
Jedoch bekomme ich nun bei einem connect mit

getResult := ahttp.Post(URL, lparams); eine EIdHTTPProtocolException mit dem Fehler "HTTP/1.0 403 Forbidden"!

Habe schon ein wenig rum probiert ,weiß aber nicht wie ich diesen Fehler ausbügelt kann...

Bitte nochmal um Hilfe

MfG basti
  Mit Zitat antworten Zitat