Вниз
Скачать: CL | DM;

Как по 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 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.012 c
1-3472
Tornado
2002-08-21 07:57
2002.09.02
ListBox


1-3431
Yaro
2002-08-18 01:42
2002.09.02
Прозрачный Label на рабочем столе


3-3300
Роман Фадеев
2002-08-13 12:17
2002.09.02
Беда с INSERT


1-3481
GreatQuaker
2002-08-21 10:46
2002.09.02
Многостраничный Hint для программы в Трее


1-3329
кондратий
2002-08-21 17:14
2002.09.02
как узнать открыт ли файл ...




   Наверх