Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-21-2011, 12:57 PM   #1 (permalink)
Registered Member
 
TheFlyingDutchman's Avatar
 
Join Date: Feb 2011
Location: NYC
Posts: 81
TheFlyingDutchman is on a distinguished road
Default Uploading to server

Hi! Does anybody know how to upload a textfile to a server from the iPhone? Maybe FTP?

Thanks,


TheFlyingDutchman
TheFlyingDutchman is offline   Reply With Quote
Old 02-21-2011, 12:59 PM   #2 (permalink)
Indie Developer
 
iSDK's Avatar
 
Join Date: Jul 2010
Posts: 1,346
iSDK is on a distinguished road
Send a message via AIM to iSDK
Default

You would want to look at ASIHTTPRequest and POST probably via PHP.

Quote:
Originally Posted by TheFlyingDutchman View Post
Hi! Does anybody know how to upload a textfile to a server from the iPhone? Maybe FTP?

Thanks,


TheFlyingDutchman
iSDK is offline   Reply With Quote
Old 02-21-2011, 01:55 PM   #3 (permalink)
Registered Member
 
TheFlyingDutchman's Avatar
 
Join Date: Feb 2011
Location: NYC
Posts: 81
TheFlyingDutchman is on a distinguished road
Smile

Quote:
Originally Posted by iSDK View Post
You would want to look at ASIHTTPRequest and POST probably via PHP.

Yah I looked into ASI, but can I do FTP instead of PHP?
TheFlyingDutchman is offline   Reply With Quote
Old 02-21-2011, 02:20 PM   #4 (permalink)
Indie Developer
 
iSDK's Avatar
 
Join Date: Jul 2010
Posts: 1,346
iSDK is on a distinguished road
Send a message via AIM to iSDK
Default

I think that you could do that, but it would definitely be easier to look into a PHP script and ASI. All you would need to do is find a script which would put the uploaded data (text file) into a folder on your server. And then from there you would just need to create a ASIHTTPRequest with the text file to your PHP file on your server.

Quote:
Originally Posted by TheFlyingDutchman View Post
Yah I looked into ASI, but can I do FTP instead of PHP?
iSDK is offline   Reply With Quote
Old 02-21-2011, 02:22 PM   #5 (permalink)
Registered Member
 
TheFlyingDutchman's Avatar
 
Join Date: Feb 2011
Location: NYC
Posts: 81
TheFlyingDutchman is on a distinguished road
Default

Quote:
Originally Posted by iSDK View Post
I think that you could do that, but it would definitely be easier to look into a PHP script and ASI. All you would need to do is find a script which would put the uploaded data (text file) into a folder on your server. And then from there you would just need to create a ASIHTTPRequest with the text file to your PHP file on your server.
Hey iSDK,


Thanks so much!

Could you give me an example with complete source?


Thanks,

Dutchman
TheFlyingDutchman is offline   Reply With Quote
Old 02-21-2011, 02:24 PM   #6 (permalink)
Indie Developer
 
iSDK's Avatar
 
Join Date: Jul 2010
Posts: 1,346
iSDK is on a distinguished road
Send a message via AIM to iSDK
Default

I am no PHP dev! I will have a quick look on around for you. There are loads that allow images to be uploaded, so I presume that you could just play around with the file types to allow .txt files to be uploaded.


edit----

This is perfect: http://php.about.com/od/advancedphp/...ile_upload.htm

It allows all files to be uploaded apart from .php files.

Quote:
Originally Posted by TheFlyingDutchman View Post
Hey iSDK,


Thanks so much!

Could you give me an example with complete source?


Thanks,

Dutchman

Last edited by iSDK; 02-21-2011 at 02:28 PM.
iSDK is offline   Reply With Quote
Old 02-21-2011, 02:55 PM   #7 (permalink)
Registered Member
 
TheFlyingDutchman's Avatar
 
Join Date: Feb 2011
Location: NYC
Posts: 81
TheFlyingDutchman is on a distinguished road
Default

Quote:
Originally Posted by iSDK View Post
I am no PHP dev! I will have a quick look on around for you. There are loads that allow images to be uploaded, so I presume that you could just play around with the file types to allow .txt files to be uploaded.


edit----

This is perfect: PHP File Upload - PHP Upload Script - Upload file script

It allows all files to be uploaded apart from .php files.


If only someone were to put videos on YouTube to do this. Could this be done with SQLite3?
TheFlyingDutchman is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone, server, upload

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 377
15 members and 362 guests
Absentia, cpsclicker, dre, Error404, Gaz, gmarro, jeroenkeij, Kirkout, mottdog, Music Man, PavelMik, teebee74, whitey99, Wikiboo
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,666
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, cpsclicker
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:11 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0