Hey,
i use b4a version 5.80.
In my app should I upload current data (football scores) via FTP.
(This is after a cheat code because the user can not do this.)
But I get no way access.
(Now I need to upload the data via a circuitous way.)
It's all right here for a free host: Hostfree.nl.
I have already asked there but get no answer.
Maybe I should not expect much of this free service.
But I want to be sure I made no coding errors.
(See: attached code.)
Does anyone have any tips?
(By the way: Download via HTTP lib is ok. The ----- is ofcourse for privacy.)
Anyway if you want to download this wonderful app (lol)
It concerns the European Football Championship 2016 in France.
See:
https://play.google.com/store/apps/details?id=ec2016.b4a&hl=nl
Jeroen van Baaren, Haarlem, Holland
Here is some code about the FTP lib:
Sub SetProcessGlobals
sURLdownload = "http://yeroen1954.hostfree.nl/i------6/maTemp.txt"
sURLupload = "/home/u-------3/public_html/public_html/maTemp.txt"
End Sub
Sub ButtonUpload_Click 'Only used if bCheat=True ! (fill in football score: 3-------9)
Dim FTP As FTP
FTP.Initialize("FTP", "FTP.yeroen1954.hostfree.nl", 21, "u------3", "f-------4")
FTP.UploadFile(Main.sDir,"maTemp.txt", True, sURLupload)
FTP.Close
' Msgbox("does not work yet...","")
End Sub
Sub FTP_UploadProgress (ServerPath As String, TotalUploaded As Long, Total As Long) 'Only used if bCheat=True !
Dim s As String
s = "Uploaded " & Round(TotalUploaded / 1000) & "KB"
If Total > 0 Then
s = s & " out of " & Round(Total / 1000) & "KB"
Log(s)
End If
End Sub
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean) 'Only used if bCheat=True !
Log(ServerPath & ", Success=" & Success)
If Success = False Then
Log(LastException.Message)
Msgbox(LastException.Message,"")
Else
Msgbox("FTP upload ready","")
End If
End Sub
i use b4a version 5.80.
In my app should I upload current data (football scores) via FTP.
(This is after a cheat code because the user can not do this.)
But I get no way access.
(Now I need to upload the data via a circuitous way.)
It's all right here for a free host: Hostfree.nl.
I have already asked there but get no answer.
Maybe I should not expect much of this free service.
But I want to be sure I made no coding errors.
(See: attached code.)
Does anyone have any tips?
(By the way: Download via HTTP lib is ok. The ----- is ofcourse for privacy.)
Anyway if you want to download this wonderful app (lol)
It concerns the European Football Championship 2016 in France.
See:
https://play.google.com/store/apps/details?id=ec2016.b4a&hl=nl
Jeroen van Baaren, Haarlem, Holland
Here is some code about the FTP lib:
Sub SetProcessGlobals
sURLdownload = "http://yeroen1954.hostfree.nl/i------6/maTemp.txt"
sURLupload = "/home/u-------3/public_html/public_html/maTemp.txt"
End Sub
Sub ButtonUpload_Click 'Only used if bCheat=True ! (fill in football score: 3-------9)
Dim FTP As FTP
FTP.Initialize("FTP", "FTP.yeroen1954.hostfree.nl", 21, "u------3", "f-------4")
FTP.UploadFile(Main.sDir,"maTemp.txt", True, sURLupload)
FTP.Close
' Msgbox("does not work yet...","")
End Sub
Sub FTP_UploadProgress (ServerPath As String, TotalUploaded As Long, Total As Long) 'Only used if bCheat=True !
Dim s As String
s = "Uploaded " & Round(TotalUploaded / 1000) & "KB"
If Total > 0 Then
s = s & " out of " & Round(Total / 1000) & "KB"
Log(s)
End If
End Sub
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean) 'Only used if bCheat=True !
Log(ServerPath & ", Success=" & Success)
If Success = False Then
Log(LastException.Message)
Msgbox(LastException.Message,"")
Else
Msgbox("FTP upload ready","")
End If
End Sub