I need to simply upload a STRING to an ftp server of mine as a txt, i searched well and nothing is working. Is there anyway of simply uploading the string to the ftp server? NOTE: i have looked at s7ftp thing simpleftp and the ftp thing from apple i could not get anything to work.
Thanks in advanced.
Can you create a server-side script to parse a POST/GET string? Seems like uploading a file could be a lot of heavy lifting/coding for something you could do in 3 lines server-side. Just an idea.
Edited addition
Here's some simple Objective-C you can poke around with:
// Create the request.
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.YOURDOMAIN.com/?string=YOURSTRINGORWHATEVER"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:60.0];
// create the connection with the request
// and start loading the data
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {
// Create the NSMutableData to hold the received data.
// receivedData is an instance variable declared elsewhere.
receivedData = [[NSMutableData data] retain];
} else {
// Inform the user that the connection failed.
}
Click here for more info on URL Loading
If you can't use ARC or are having troubles with it, try this class. Pretty handy:
Hope this helps.