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

Вниз

Парсинг Url a   Найти похожие ветки 

 
rOOse ©   (2006-03-07 08:31) [0]

Нужно с линка http://www.somesite.com/abc/def/index.html
вытащить http://www.somesite.com это самому парсить надо или есть какие-то методы?


 
Dmitrij_K   (2006-03-07 10:03) [1]

В indy есть класс TidURL или TidURI? уже точно не помню


 
Dmitrij_K   (2006-03-07 10:13) [2]

Удалено модератором


 
Dmitrij_K   (2006-03-07 10:14) [3]

Удалено модератором


 
Dmitrij_K   (2006-03-07 10:30) [4]

Удалено модератором


 
seeker ©   (2006-03-07 10:38) [5]


function InternalInternetCrackUrl(  Url: string;                        // string that contains the canonical URL to crack
                         options:TInternetURLCrackOptions;   // icoDECODE: Converts encoded characters back to their normal form.
                                                             // icoESCAPE Converts all escape sequences (%xx) to their corresponding characters
                         var UrlComponents: TURL_Components  // TURLCOMPONENTS structure that receives the URL components
                         ): boolean;                         // Returns TRUE if the function succeeds, or FALSE otherwise.
var                                                              //   To get extended error information, "call GetLastError"
 dwFlags: DWORD; // that contains the flags controlling the operation. This can be one of the following values: ICU_DECODE (Converts encoded characters back to their normal form.), ICU_ESCAPE (Converts all escape sequences (%xx) to their corresponding characters)
 aUrlComponents: TURLComponents;
begin
 dwFlags:=0;
 if icoDECODE in options then
   dwFlags:=dwFlags or ICU_DECODE;
 if icoESCAPE in options then
   dwFlags:=dwFlags or ICU_ESCAPE;

 aUrlComponents.dwSchemeLength:=1024;
 aUrlComponents.dwHostNameLength:=1024;
 aUrlComponents.dwUserNameLength:=1024;
 aUrlComponents.dwPasswordLength:=1024;
 aUrlComponents.dwUrlPathLength:=1024;
 aUrlComponents.dwExtraInfoLength:=1024;
 aUrlComponents.dwStructSize:=sizeof(aUrlComponents);
 getMem(aUrlComponents.lpszScheme,aUrlComponents.dwSchemeLength);
 getMem(aUrlComponents.lpszHostName,aUrlComponents.dwHostNameLength);
 getMem(aUrlComponents.lpszUserName,aUrlComponents.dwUserNameLength);
 getMem(aUrlComponents.lpszPassword,aUrlComponents.dwPasswordLength);
 getMem(aUrlComponents.lpszUrlPath,aUrlComponents.dwUrlPathLength);
 getMem(aUrlComponents.lpszExtraInfo,aUrlComponents.dwExtraInfoLength);
 try
   result:=boolean(InternetCrackUrl(pchar(Url),0, dwFlags,aUrlComponents));
   if result then
   begin
     UrlComponents.Scheme:=string(aUrlComponents.lpszScheme);
     UrlComponents.nScheme:=APISchemeEnumToNative(aUrlComponents.nScheme);
     UrlComponents.HostName:=string(aUrlComponents.lpszHostName);
     UrlComponents.nPort:=aUrlComponents.nPort;
     UrlComponents.pad:=aUrlComponents.pad;
     UrlComponents.UserName:=string(aUrlComponents.lpszUserName);
     UrlComponents.Password:=string(aUrlComponents.lpszPassword);
     UrlComponents.UrlPath:=string(aUrlComponents.lpszUrlPath);
     UrlComponents.ExtraInfo:=string(aUrlComponents.lpszExtraInfo);
   end;
 finally
   freeMem(aUrlComponents.lpszScheme,aUrlComponents.dwSchemeLength);
   freeMem(aUrlComponents.lpszHostName,aUrlComponents.dwHostNameLength);
   freeMem(aUrlComponents.lpszUserName,aUrlComponents.dwUserNameLength);
   freeMem(aUrlComponents.lpszPassword,aUrlComponents.dwPasswordLength);
   freeMem(aUrlComponents.lpszUrlPath,aUrlComponents.dwUrlPathLength);
   freeMem(aUrlComponents.lpszExtraInfo,aUrlComponents.dwExtraInfoLength);
 end;
end;


 
rOOse ©   (2006-03-07 12:30) [6]


> [5] seeker ©   (07.03.06 10:38)


Спасибо.



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

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

Наверх





Память: 0.47 MB
Время: 0.012 c
15-1149849028
iamdanil
2006-06-09 14:30
2006.07.09
RS Stereo Image 2006


5-1135180039
Domkrat
2005-12-21 18:47
2006.07.09
Компонент и длл


2-1151117389
gamebit3000
2006-06-24 06:49
2006.07.09
Не получается связать несколько БД и сделать их поля вычисляемыми


2-1150648613
mctarik
2006-06-18 20:36
2006.07.09
Почему ничего не происходит при выполнении данного кода ...


1-1148648699
001
2006-05-26 17:04
2006.07.09
Стрелка в Excel





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский