STRING を私の ftp サーバーに txt として単純にアップロードする必要があります。よく検索しましたが、何も機能していません。文字列を単純に ftp サーバーにアップロードする方法はありますか? 注: 私は s7ftp の simpleftp と Apple の ftp を見ましたが、何も動作しませんでした。
ありがとうございます。
POST/GET 文字列を解析するサーバー側スクリプトを作成できますか? ファイルのアップロードは、サーバー側で 3 行で実行できることを行うには、大変な作業/コーディングになる可能性があるようです。ただのアイデア。
加筆修正
これは、あなたがいじることができるいくつかの簡単なObjective-Cです:
// 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.
}
ARC が使えない、または ARC に問題がある場合は、このクラスを試してください。とても便利です:
お役に立てれば。