hi, rejetto, thanks for your reply. i used WinINet.
this is my code, but dosen't work, Plz help me again, thank you.
ALocalFile:= 'D:\upload\111.txt';
ARemoteServer:= '127.0.0.1';
ARemoteFile:= '/101_111.txt';
HttpNet := InternetOpen(PChar(ARemoteServer), INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
HttpConnect := InternetConnect(HttpNet, PChar(ARemoteServer), 0, nil, nil, INTERNET_SERVICE_HTTP, 0, 0);
HttpRequest := HttpOpenRequest(HttpConnect, 'PUT', PChar(ARemoteFile), nil, nil, nil, 0, 0);
hFile := CreateFile(PChar(ALocalFile), GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
FillChar(BufferIn, SizeOf(BufferIn), 0);
BufferIn.dwStructSize := SizeOf(BufferIn);
BufferIn.dwBufferLength := cBuffsize;
BufferIn.dwBufferTotal := GetFileSize(hFile, nil);
HttpSendRequestEx(HttpRequest, @BufferIn, nil, HSR_INITIATE, 0);
ReadInF := 0;
repeat
SetLength(pBuffer, cBuffsize);
ReadFile(hFile, Pointer(pBuffer)^, cBuffsize, Count, nil);
ReadInF := ReadInF + Count;
InternetWriteFile(httpRequest, Pointer(pBuffer), Count, oBytesWritten);
until ReadInF = BufferIn.dwBufferTotal;
HttpEndRequest(HttpRequest, nil, 0, 0);
InternetCloseHandle(HttpRequest);
InternetCloseHandle(HttpConnect);
InternetCloseHandle(HttpNet);