Форум: "Сети";
Текущий архив: 2002.09.02;
Скачать: [xml.tar.bz2];
ВнизКак по HTTP проверить наличие/доступность файла в инете? Найти похожие ветки
← →
lipskiy (2002-06-21 01:35) [0]Собственноручно выложенная в UBPFD функция
http://delphibase.endimus.com/?action=viewfunc&topic=netconnect&index=2
работает не всегда правильно, на отсутствующие файла говорит ок.
Есть надежный вариант проверить?
← →
lipskiy (2002-06-21 19:49) [1]Ну ась?
← →
Cobalt (2002-06-22 11:01) [2]hfile:=InternetOpenUrl(hsession,pchar(URL),nil,0,INTERNET_FLAG_RELOAD,0); А где проверка коректности hfile? может здесь собака порылась?
dwIndex:= 0;
dwCodeLen:= 10;
HttpQueryInfo(hfile,HTTP_QUERY_STATUS_CODE,@dwcode,dwcodeLen,dwIndex);
res:= pchar(@dwcode);
result:= (res ="200") or (res ="302");
if assigned(hfile) then InternetCloseHandle(hfile);
← →
lipskiy (2002-06-22 15:01) [3]А как ее проверить?
← →
Cobalt (2002-06-22 16:20) [4]http://msdn.microsoft.com/workshop/networking/wininet/reference/functions/internetopenurl.asp
Return Value
Returns a valid handle to the FTP, Gopher, or HTTP URL if the connection is successfully established, or NULL if the connection fails. To retrieve a specific error message, call GetLastError. To determine why access to the service was denied, call InternetGetLastResponseInfo.
Страницы: 1 вся ветка
Форум: "Сети";
Текущий архив: 2002.09.02;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.382 c