| 58 |
FPassword: string; |
FPassword: string; |
| 59 |
FProxyAddress: string; |
FProxyAddress: string; |
| 60 |
FClientUA: string; |
FClientUA: string; |
|
FDolibURL: string; |
|
| 61 |
function GetSessionID: string; |
function GetSessionID: string; |
| 62 |
function GetVersion: string; |
function GetVersion: string; |
| 63 |
function GetUserAgent: string; |
function GetUserAgent: string; |
| 83 |
property UserAgent: string read GetUserAgent; |
property UserAgent: string read GetUserAgent; |
| 84 |
property ErrorCode: integer read GetErrorCode; |
property ErrorCode: integer read GetErrorCode; |
| 85 |
property ErrorMsg: string read GetErrorMsg; |
property ErrorMsg: string read GetErrorMsg; |
|
property DolibURL: string read FDolibURL write FDolibURL; |
|
| 86 |
end; |
end; |
| 87 |
|
|
| 88 |
implementation |
implementation |
| 90 |
DOLIB_VERSION = $10000; |
DOLIB_VERSION = $10000; |
| 91 |
DOLIB_LOGIN_UA = 'DOLIB/1.00'; |
DOLIB_LOGIN_UA = 'DOLIB/1.00'; |
| 92 |
DOLIB_LOGIN_HOST = 'tiger2.he.net'; |
DOLIB_LOGIN_HOST = 'tiger2.he.net'; |
| 93 |
// DOLIB_LOGIN_URL = '/~tora3n2c/futen.cgi'; |
DOLIB_LOGIN_URL = '/~tora3n2c/futen.cgi'; |
| 94 |
DOLIB_2CH_UA = 'X-2ch-UA:'; |
DOLIB_2CH_UA = 'X-2ch-UA:'; |
| 95 |
// DOLIB_2CH_UA = 'X-2ch-UA: gikoNavi/1.00'#13#10; |
// DOLIB_2CH_UA = 'X-2ch-UA: gikoNavi/1.00'#13#10; |
| 96 |
DOLIB_ENOMEM_STRING = 'メモリが足りません。'; |
DOLIB_ENOMEM_STRING = 'メモリが足りません。'; |
| 247 |
if not Assigned(hConnect) then |
if not Assigned(hConnect) then |
| 248 |
MakeError(FSession, GetLastError()) |
MakeError(FSession, GetLastError()) |
| 249 |
else begin |
else begin |
| 250 |
hRequest := HttpOpenRequest(hConnect, 'POST', PChar(FDolibURL), |
hRequest := HttpOpenRequest(hConnect, 'POST', DOLIB_LOGIN_URL, |
| 251 |
nil, nil, nil, |
nil, nil, nil, |
| 252 |
INTERNET_FLAG_NO_CACHE_WRITE or INTERNET_FLAG_NO_COOKIES or |
INTERNET_FLAG_NO_CACHE_WRITE or INTERNET_FLAG_NO_COOKIES or |
| 253 |
INTERNET_FLAG_NO_UI or INTERNET_FLAG_SECURE, 0); |
INTERNET_FLAG_NO_UI or INTERNET_FLAG_SECURE, 0); |
| 317 |
if not Assigned(hConnect) then |
if not Assigned(hConnect) then |
| 318 |
MakeError(FSession, GetLastError()) |
MakeError(FSession, GetLastError()) |
| 319 |
else begin |
else begin |
| 320 |
hRequest := HttpOpenRequest(hConnect, 'POST', PChar(FDolibURL), |
hRequest := HttpOpenRequest(hConnect, 'POST', DOLIB_LOGIN_URL, |
| 321 |
nil, nil, nil, |
nil, nil, nil, |
| 322 |
INTERNET_FLAG_NO_CACHE_WRITE or INTERNET_FLAG_NO_COOKIES or |
INTERNET_FLAG_NO_CACHE_WRITE or INTERNET_FLAG_NO_COOKIES or |
| 323 |
INTERNET_FLAG_NO_UI or INTERNET_FLAG_SECURE, 0); |
INTERNET_FLAG_NO_UI or INTERNET_FLAG_SECURE, 0); |