![]() |
Http-Abfrage ohne Cache
Ich versuche ein PHP-Script auszulösen und das Ergebnis der Scriptausführung auszuwerten.
Allerdings funktioniert das nur einmal, beim zweiten mal bekomme ich sofort das Ergebnis der letzten Abfrage, ohne das der Server erwas davon mitbekommt.
Delphi-Quellcode:
Wenn ich die Anwendung neu starte, funktioniert es scheinbar erneut genau einmal.
begin
hSession := InternetOpen(PChar(sAppName), INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0); if not Assigned(hSession) then RaiseLastOSError; try { INTERNET_OPTION_BYPASS_EDITED_ENTRY hat auch nichts gebracht } dwByPass := 1; InternetSetOption(hSession, INTERNET_OPTION_BYPASS_EDITED_ENTRY, @dwByPass, SizeOf(dwByPass)); hURL := InternetOpenURL(hSession, PChar(sFileURL), nil, 0, INTERNET_FLAG_PRAGMA_NOCACHE, 0); if not Assigned(hURL) then RaiseLastOSError; try dwBufferLen := BufferSize; repeat Win32Check(InternetReadFile(hURL, @Buffer, SizeOf(Buffer), dwBufferLen)); Stream.Write(buffer, dwBufferLen); until dwBufferLen = 0; Stream.Seek(0, soFromBeginning); finally InternetCloseHandle(hURL); end; finally InternetCloseHandle(hSession); end; end; Jemand eine gute Idee? |
Re: Http-Abfrage ohne Cache
Versuch es mal mit INTERNET_FLAG_RELOAD beim InternetOpenUrl.
|
Re: Http-Abfrage ohne Cache
Danke, das hat funktioniert.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:06 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz