Stavljanje fajla na ftp server

1

Stavljanje fajla na ftp server

offline
  • Pridružio: 28 Jun 2004
  • Poruke: 990
  • Gde živiš: Kucura

Kako da kada pokrenem progrm a na internetu sam da program stavi jedan text fajl na moj ftp server?
normalno dam mu lozinku username i sve sto je potrebno



Registruj se da bi učestvovao u diskusiji. Registrovanim korisnicima se NE prikazuju reklame unutar poruka.
offline
  • neko2 
  • Ugledni građanin
  • Pridružio: 22 Avg 2004
  • Poruke: 388
  • Gde živiš: Kovacica moja kuca

koji program imas? dali ti server podrzava passive mode transfer? (pokusaj da to ukljucis - iskljucis), u adresu servera napisi ili obrisi (ako imas ftp. ispred imana servera



offline
  • Pridružio: 28 Jun 2004
  • Poruke: 990
  • Gde živiš: Kucura

cek
ja hocu da napravim program koji bi to uradio
koristim basic
Meni samo treba da mi neko objasni kako, ne treba da mi kucka kod

offline
  • Pridružio: 18 Apr 2003
  • Poruke: 5001
  • Gde živiš: Beograd

za pocetak mozes da procitas tekst o FILE TRANSFER PROTOCOL (FTP)
https://www.mycity.rs/must-login.png

offline
  • Pridružio: 25 Feb 2004
  • Poruke: 35
  • Gde živiš: BiH-RS

Probaj ovo:
Const FTP_TRANSFER_TYPE_UNKNOWN = &H0 Const FTP_TRANSFER_TYPE_ASCII = &H1 Const FTP_TRANSFER_TYPE_BINARY = &H2 Const INTERNET_DEFAULT_FTP_PORT = 21               ' default for FTP servers Const INTERNET_SERVICE_FTP = 1 Const INTERNET_FLAG_PASSIVE = &H8000000            ' used for FTP connections Const INTERNET_OPEN_TYPE_PRECONFIG = 0                    ' use registry configuration Const INTERNET_OPEN_TYPE_DIRECT = 1                        ' direct to net Const INTERNET_OPEN_TYPE_PROXY = 3                         ' via named proxy Const INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4   ' prevent using java/script/INS Const MAX_PATH = 260 Private Type FILETIME     dwLowDateTime As Long     dwHighDateTime As Long End Type Private Type WIN32_FIND_DATA     dwFileAttributes As Long     ftCreationTime As FILETIME     ftLastAccessTime As FILETIME     ftLastWriteTime As FILETIME     nFileSizeHigh As Long     nFileSizeLow As Long     dwReserved0 As Long     dwReserved1 As Long     cFileName As String * MAX_PATH     cAlternate As String * 14 End Type Private Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUserName As String, ByVal sPassword As String, ByVal lService As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long Private Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hConnect As Long, ByVal lpszLocalFile As String, ByVal lpszNewRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean Const PassiveConnection As Boolean = True Private Sub Command1_Click()     Dim hConnection As Long, hOpen As Long, sOrgPath  As String     'open an internet connection     hOpen = InternetOpen("API-Guide sample program", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)     'connect to the FTP server     hConnection = InternetConnect(hOpen, "your ftp server", INTERNET_DEFAULT_FTP_PORT, "your login", "your password", INTERNET_SERVICE_FTP, IIf(PassiveConnection, INTERNET_FLAG_PASSIVE, 0), 0)     'create a buffer to store the original directory     sOrgPath = String(MAX_PATH, 0)     FtpPutFile hConnection, "C:\test.htm", "test.htm", FTP_TRANSFER_TYPE_UNKNOWN, 0     'close the ftp connection     InternetCloseHandle hConnection     'close the internet connection     InternetCloseHandle hOpen End Sub

offline
  • Pridružio: 28 Jun 2004
  • Poruke: 990
  • Gde živiš: Kucura

@sove
uspelo je
ali posto imam remote dir www pa kako onda sa tim?

hvala na sourceu

offline
  • Pridružio: 25 Feb 2004
  • Poruke: 35
  • Gde živiš: BiH-RS

biser-x ::
uspelo je
ali posto imam remote dir www pa kako onda sa tim?


NE KONTAM sta hoces ??!!.. Obrazlozi.

offline
  • Pridružio: 28 Jun 2004
  • Poruke: 990
  • Gde živiš: Kucura

pa provajder mi je neobee
i kada zelim da postavim prezentaciju poram da je smestim u direktorijum WWW
Posto radim iz total komandera tamo se podesi i to je to ali kada stavljam ovako on test.htm ne stavi u www nego izvan njega

offline
  • Pridružio: 18 Apr 2003
  • Poruke: 8134
  • Gde živiš: U kesici gumenih bombona...

ftp klijenta za prebacivanje sajtova na server imas u Dreamweaveru jos od radnijih verzija... mislim da ti je tako najlakse, a sto je najbolje, nije tesko raditi snjim...

offline
  • Pridružio: 28 Jun 2004
  • Poruke: 990
  • Gde živiš: Kucura

ma meni treba jer ocu da kada pokrenem program da na server stavi moju ip adresu

kada se moj drug konektuje on uzima moju ip adresu i konektuje se na moj program

kada uspostavimo vezu mozemo da catujemo

a za prebacivanje sajta koristim Total Commander

Ko je trenutno na forumu
 

Ukupno su 662 korisnika na forumu :: 7 registrovanih, 4 sakrivenih i 651 gosta   ::   [ Administrator ] [ Supermoderator ] [ Moderator ] :: Detaljnije

Najviše korisnika na forumu ikad bilo je 3028 - dana 22 Nov 2019 07:47

Korisnici koji su trenutno na forumu:
Korisnici trenutno na forumu: ALBION101, bojank, goxin, Kruger2, LUDI, sakota79, TheChains