Saturday, May 16, 2009

Turn your iPhone into a Web Server...Your Website In Your Pocket!

Sure, you can take a picture with your iPhone and upload it to Facebook, you can use a VNC or RDP app to remotely control a server and tweak a website...

...but what if you could turn your iPhone into the machine hosting the website? As in, literally walk around with an http web server in your pocket, with a public website that people can access to see your photos and other media?

For the typical techno-muggle, the whole "server" thing is still a bit of a mystery. Your average web user knows that they can upload photos somewhere, and somewhat more advanced ones might know they can blog by typing an article into an edit box and clicking "publish", maybe even linking in the previously mentioned photos. Where and how that content exists is unknown though, so if it wasn't for tools like Blogger, Flickr, Facebook, etc., the typical user would have little or no web presence. 

I don't think it's because your average web user is incapable of understanding servers, I'd guess it's more a matter of just being exposed to a web server and understanding how a it makes content available. If you could put one on your iPhone, which is connected to the Internet, and use it to publish your pictures, and/or other info, that might fit the bill. It wouldn't necessarily mean building out web sites; say for instance, you took a picture, and the tool automatically copied it to the folder on the iPhone that makes is publicly available; you'd just tell people the link to your phone, and there you go.

Think of it as a personal, portable, data and media center. 

Looks like it's starting; Freebit, a Japanese company, has put out a free iPhone app, called "ServersMan", which does this. Your phone literally becomes a mobile server. 

Check it out at (make sure to look in the upper right for the "English" link):

http://www.serversman.com

I couldn't believe it; I had to try it. I'm astonished to say, it's very easy and seems to work. I haven't run load capacity tests or any such things yet, and to be honest I don't know "exactly" how it works or whether there's any smoke and mirrors, but from what I can tell initially, it legitimately makes your iPhone into a walking http web server, with WebDAV installed so you can manage the content externally (the iPhone doesn't have a way to do this natively). 

You can actually try it; my iPhone is on and serving. Go to this link:

http://serversman.net/tcoztech-node/

This sends you to the ServersMan infrastructure, which proxies your request to my iPhone. You'll see a frameset page, which actually lives on my iPhone, with a message in the top frame telling you what you're looking at, and my blog in the bottom frame. Note that ONLY the frameset page is on the iPhone; the pages that fill it are on my usual www.tcoz.com server, but from what I can see, if I wanted to, I could have put it all right on my phone. 

ServersMan has some other interesting capability too. They say that by using the tools provided with the app (remember this is all right on your phone), you can easily create a "mashup" website on-the-go. 

For example, go to this link:

http://serversman.net/tcoztech-node/photos/picture.jpg

You are now looking at a picture that I took with my iPhone camera (one of my guitars), being served from my iPhone, automatically named "picture.jpg" and made available. You can even make your whole camera roll viewable with one click if you want to, it'll build out a web page with links and everything, right on your phone. Ordinarily, you'd have to upload all this and so on, now you can just it in bulk and manage all the content right on your phone. 

Now take a look at this:

http://serversman.net/tcoztech-node/location.html

Serversman can take your GPS information, save the information locally, and make it available through the Google Maps API. So at any time, I can just leave this capability on, and you can see exactly where I am (more or less). Why is this a great thing? Say I'm trying to get to you and I'm lost. Just hit my iPhone address and you'll see exactly where I am, and you can say "make your next right".  

All these little mashup gadgets are right on the iPhone. I didn't have to go to an external website, or hit "upload", or anything like that. Again, the phone IS the server. 

How do you manage content on it though? For that, you do have to go to a website, because there's no way on the phone to explore folders and move around files (iPhone doesn't give you Finder-like access natively). For this, ServersMan uses WebDav, which in a nutshell, is a way to enable access and management of web server content remotely, like from a tool or website. You log into the ServersMan website with your account credentials, it connects to your phone through WebDAV, and there you see all the content on your phone in a simple folder structure. You can upload things (which transfers them to your iPhone directly), move things around, and so on. Using this tool, you can build a complete website right on your iPhone. 

There's other features too; voice notes, music, all can be made available from the device. I don't use any of this, but it's there and if it works as well as the rest of the app, should be fine. 

I have to say, it's amazing. I'll leave my iPhone-site up and running for a bit so the links in this blog work; tweet me if it's down and you want to try it. One thing I haven't figure out yet is whether or not I can switch to another app without shutting down the web server. If the app is up, and I leave the phone alone, it's fine, but if switch to another app, it seems to shut down; this may be because I just don't know something. It could just be the iPhone itself though, since as of yet, "run in background" for apps is pretty much non-existent (this is actually a huge downside for iPhone app developers).  

A lot of people may say, "this is ridiculous I  can already do that this way that way etc. etc."; there's always the knee-jerk "this is stupid" type. People used to say the same thing about cel phones and ATMs. Download it, use it, experiment with an open mind, and you might find that it changes the way you use and/or think about your iPhone.  I already know that I'll use it for a couple of things. 

Screenshots below, not served from my iPhone though...isn't it amazing you could actually ask that question?

Screenshots of the basic app admin pages, etc.


 
 
 
 
 




This photo is what you'll see if you nav to my iPhone web server and ServersMan isn't active:






As always, thanks for coming by. 






2 comments:

  1. Awesome... I really love the way you write your article here... And also it shows facts which I like. Thanks for sharing this.

    iphone developer

    ReplyDelete
  2. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.

    hire iphone developer

    ReplyDelete