Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nichlaspro

macrumors member
Original poster
Jan 21, 2015
82
1
Hi all!

How can you upload some text or just a local text file to your FTP server?

Because i can't find the answer on google;-)

Thanks!

(JUST ASK IF U WANT MORE INFO)

Edit: It's because I want to store some user data and they should not be able to edit that information....
 

nichlaspro

macrumors member
Original poster
Jan 21, 2015
82
1
It's not a must to use ftp for me..

But I just want a way to send data that the user has written to a place where I can see that but not the user.. So I need a way to store user data without the user will be able to change the text/information before sending the info to me..

Because the only way to send user data to me, is to make them send me a mail but they can edit the text before they send it...

That's not what I want, so someone please help me fixing this and np if u can't understand some of my pretty bad English;-)

Thank!!!

----------



What else could I use??
 

DennisBlah

macrumors 6502
Dec 5, 2013
485
2
The Netherlands
If you have some basic knowledge of php you can do a lot of things like that ;-) Even build an database of the information you are lookig for to store.

lookup NSURLConnection for sending info to an page.
If any help wished, I'm here somewhere :)
 

nichlaspro

macrumors member
Original poster
Jan 21, 2015
82
1
If you have some basic knowledge of php you can do a lot of things like that ;-) Even build an database of the information you are lookig for to store.

lookup NSURLConnection for sending info to an page.
If any help wished, I'm here somewhere :)

But I don't have any http sites??

----------

How big is the data (in bytes)?

Maybe you can use HTTP POST.

It's just a text file with two lines...

But I do not have a http server....:-((( Just want a smart way to do the sending..
 

chown33

Moderator
Staff member
Aug 9, 2009
10,751
8,425
A sea of green
But I don't have any http sites??

But you do have an FTP server?

You're not explaining things completely here. You need to lay out the whole thing: what you have, what you want, etc.


Two lines is easily done by HTTP POST. You can build an HTTP service on Google's App Engine. There are other service providers, that's just one example.
 

nichlaspro

macrumors member
Original poster
Jan 21, 2015
82
1
But you do have an FTP server?

You're not explaining things completely here. You need to lay out the whole thing: what you have, what you want, etc.


Two lines is easily done by HTTP POST. You can build an HTTP service on Google's App Engine. There are other service providers, that's just one example.

I'll quickly try that and response back after that...

----------

But you do have an FTP server?

You're not explaining things completely here. You need to lay out the whole thing: what you have, what you want, etc.


Two lines is easily done by HTTP POST. You can build an HTTP service on Google's App Engine. There are other service providers, that's just one example.

Annnddd I do have an ftp server.

What I want is a simple way to store user written data to some kind of server when they have clicked a button.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
Apple has sample code for ftp called SimpleFTP. There is plenty of iOS FTP sample code on the net. I think you can send data to an ftp:// url with the usual NSURLConnection methods and it will work.

Having said that, you want to arrange things so one user doesn't overwrite the file that another user sent. ftp is not usually the correct answer.
 

AppSwage

macrumors newbie
Jan 18, 2015
29
0
From your initial post you seemed most concerned with the user's ability to edit the data. If that's the issue and not that you want access to it than you could store data in the keychain. The only reason to store data on a server is if you need to use it outside the app.
 

nichlaspro

macrumors member
Original poster
Jan 21, 2015
82
1
Okay wait, let's say we need to store the users username and password online..

But where? Would do that ftp, http or something else??

Thanks!

----------

I'll quickly try that and response back after that...

----------



Annnddd I do have an ftp server.

What I want is a simple way to store user written data to some kind of server when they have clicked a button.


No, wait. I do not want to pay, do not have so much money but any other way I can store something like a username and a text like his/her phone number, just to give an example??

----------

And my will will only be sending a very small text information to some kind of server or what you thing you should for that. It shall not be retrieving data, only be sending.

But how?

Thanks!

----------

Apple has sample code for ftp called SimpleFTP. There is plenty of iOS FTP sample code on the net. I think you can send data to an ftp:// url with the usual NSURLConnection methods and it will work.

Having said that, you want to arrange things so one user doesn't overwrite the file that another user sent. ftp is not usually the correct answer.

What then?
 

DannyBres

macrumors 65816
Oct 30, 2007
1,412
6
UK
I had a similar problem.

My data was just about usage of a webservice and all anonymous, so security wasn't a huge concern. I do it with POST to a php script that stores it all in a MySQL database. IMO, that is what you want/should do to, I'd be scared compiling ftp credentials into an app (not sure why, just doent seem right).

I'm sure you could implement my approach for free, no idea where though, maybe you can use heroku?

If it is a username and password... plain text on an FTP server is not the way to do that and it is not scalable at all!

Who is going to be using it? How many users? Why do you have no budget? Will this be a commercial app?
 

nichlaspro

macrumors member
Original poster
Jan 21, 2015
82
1
AHH THANKS GUYS! I'm using parse right now to upload data and it works like charm!

THANKS!!!!!

You guys are great!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.