![]() |
Re: Prüfen, ob Bild im Internet erreichbar
Aber an der Programmlogik :mrgreen:
|
Re: Prüfen, ob Bild im Internet erreichbar
Was ist, wenn das Bild bei jemandem steht, der keine direkten Links zulässt? Und dann bei jedem Link auf eines seiner Bilder plötzlich sowas hier liefert?
![]() Das merkt das Programm aber nicht, oder? Edit: Gott ist das groß, ich suche schon ne kleinere Version davon.... Sherlock |
Re: Prüfen, ob Bild im Internet erreichbar
Ich habe jetzt
![]()
Delphi-Quellcode:
Ich werd nacher (wenn der die Liste abgearbeitet hat) mal schauen, ob die richtig funktioniert hat.
function IsUrlValid(const url: string): boolean;
var hInet: HINTERNET; hConnect: HINTERNET; infoBuffer: array [0..512] of char; dummy: DWORD; bufLen: DWORD; okay: LongBool; reply: String; begin hInet := InternetOpen(PChar(application.title), INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY,nil,nil,0); hConnect := InternetOpenUrl(hInet,PChar(url),nil,0, INTERNET_FLAG_NO_UI,0); if not Assigned(hConnect) then //---------------------------------------------------------- // If we couldn't open a connection then we know the url // is bad. The most likely reason is that the url is bad, // but it could be because of an unknown or badly specified // protocol. //---------------------------------------------------------- result := false else begin // Create a request for the url. dummy := 0; bufLen := Length(infoBuffer); okay := HttpQueryInfo(hConnect,HTTP_QUERY_STATUS_CODE, @infoBuffer[0],bufLen,dummy); if not okay then // Probably working offline, or no internet connection. result := False else result := infoBuffer= '200'; InternetCloseHandle(hConnect); end; InternetCloseHandle(hInet); end; Zitat:
|
Re: Prüfen, ob Bild im Internet erreichbar
Du hast #5 nicht gelesen, stimmt' s?
|
Re: Prüfen, ob Bild im Internet erreichbar
Zitat:
|
Re: Prüfen, ob Bild im Internet erreichbar
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:13 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 by Thomas Breitkreuz