Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 2002.10.07;
Скачать: [xml.tar.bz2];

Вниз

Рабочий URL   Найти похожие ветки 

 
BorisMor   (2002-08-03 12:05) [0]

Полскажите как определить что по определенному ардресу [ напрмер http://delphi.mastak.ru :) ] существует сайт.


 
BorisMor   (2002-08-03 12:07) [1]

извиняюсь за очепятки :)


 
Anatoly Podgoretsky   (2002-08-03 12:28) [2]

В общем случае никак, в частном случае попытаться пропинговать, прочитать что нибудь от туда, просканировать по всему диапазону портов.
Потом существует это что, очень неодназное понятие, попробуй подругому сформулировать вопрос.


 
BorisMor   (2002-08-03 13:40) [3]

Не существует это когда "Cannot find address of".
Ну и "подозрение на не существование" когда открывается сайт с другим URL (это может быть переадресацией)


 
Anatoly Podgoretsky   (2002-08-03 14:17) [4]

Ясно значит не физическое существование, а наличие записи в DNS
Второй вариант может означать как существование, только не совсем то что ты ожидал увидеть, но и переадресацию также.


 
Opuhshii   (2002-08-03 16:15) [5]

есть, в МСДН такая функция описана а вот в WindowsSDK её нет,...

HINTERNET InternetOpenUrl( HINTERNET hInternet,
LPCTSTR lpszUrl,
LPCTSTR lpszHeaders,
DWORD dwHeadersLength,
DWORD dwFlags,
DWORD_PTR dwContext
);


hInternet
[in] HINTERNET handle to the current Internet session. The handle must have been returned by a previous call to InternetOpen.
lpszUrl
[in] Pointer to a string variable that contains the URL to begin reading. Only URLs beginning with ftp:, gopher:, http:, or https: are supported.
lpszHeaders
[in] Pointer to a string variable that contains the headers to be sent to the HTTP server. (For more information, see the description of the lpszHeaders parameter in the HttpSendRequest function.)
dwHeadersLength
[in] Unsigned long integer value that contains the length, in TCHARs, of the additional headers. If this parameter is -1L and lpszHeaders is not NULL, lpszHeaders is assumed to be zero-terminated (ASCIIZ) and the length is calculated.
dwFlags
[in] Unsigned long integer value that contains the API flags. This can be one of the following values:
INTERNET_FLAG_EXISTING_CONNECT
Attempts to use an existing InternetConnect object if one exists with the same attributes required to make the request. This is useful only with FTP operations, since FTP is the only protocol that typically performs multiple operations during the same session. The Microsoft® Win32® Internet API caches a single connection handle for each HINTERNET handle generated by InternetOpen.
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP
Disables the ability of the Win32 Internet functions to detect this special type of redirect. When this flag is used, Win32 Internet functions transparently allow redirects from HTTPS to HTTP URLs.
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS
Disables the ability of the Win32 Internet functions to detect this special type of redirect. When this flag is used, Win32 Internet functions transparently allow redirects from HTTP to HTTPS URLs.
INTERNET_FLAG_KEEP_CONNECTION
Uses keep-alive semantics, if available, for the connection. This flag is required for Microsoft Network (MSN), NT LAN Manager (NTLM), and other types of authentication.
INTERNET_FLAG_NEED_FILE
Causes a temporary file to be created if the file cannot be cached.
INTERNET_FLAG_RELOAD
Forces a download of the requested file, object, or directory listing from the origin server, not from the cache.
dwContext
[in] Pointer to an unsigned long integer value that contains the application-defined value that is passed, along with the returned handle, to any callback functions.
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.
BEST REGARDS
Opuhshii


 
BorisMor   (2002-08-03 16:58) [6]

>Opuhshii
для InternetOpenUrl нужен InternetOpen и InternetCloseHandle
что подкулючать чтобы Delphi их знала ?

hInternet - это что за тип данных такой странный ?


 
Jeer   (2002-08-03 17:20) [7]

Так тоже можно:
Компонент TNMHTTP с палитры FastNet

Метод nm.Get("delphi.mastak.ru");

OnConnectionFailed или OnConnect обрабатываешь..


 
Malder   (2002-08-03 20:10) [8]

Кстати. А что имел в виду автор сообщения ?

Полскажите как определить что по определенному ардресу [ напрмер http://delphi.mastak.ru :) ] существует сайт.

Если именно сайт, то тогда нужно проверять соединение по 80, 8080 портам. А если нужно узнать, существует ли такой хост - это другой вопрос. А если нужно узнать, есть ли компьютер в интернете а данным IP - то это уже третий вопрос...


 
Anatoly Podgoretsky   (2002-08-03 20:16) [9]

Не одназначно, порты могут быть любые, и отвечать тебе не обязаны


 
Malder   (2002-08-04 11:13) [10]

Anatoly Podgoretsky © (03.08.02 20:16) не понял вашей мысли. Какие порты могут быть любыми ? На которых висит httpd ? Это ясно. Но по другому то не проверишь. Естесственно, что если компьютер тебе не отвечает - это не значит, что он не отвечает никому...


 
Anatoly Podgoretsky   (2002-08-04 12:58) [11]

Именно это я и говорю


 
Opuhshii   (2002-08-05 10:14) [12]

2BorisMor (03.08.02 16:58)
Uses WinInet
смотри пост Anatoly Podgoretsky © (03.08.02 20:16)



Страницы: 1 вся ветка

Форум: "Сети";
Текущий архив: 2002.10.07;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.48 MB
Время: 0.011 c
4-21300
Cybermonk
2002-08-20 07:58
2002.10.07
Units


1-21038
USTAS
2002-09-27 11:58
2002.10.07
Может просветит кто? (ну очень бы хотелось)


7-21290
flegma
2002-07-29 01:56
2002.10.07
Как сделать форму невидимой сразу после запуска приложения?


1-20967
Шурик Ш
2002-09-25 18:00
2002.10.07
Открытие формы


1-21071
Shrek
2002-09-24 22:30
2002.10.07
DiskFree! DiskSize!





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский