How to Download YouTube Videos by PQ FLV Downloader

 

A One-Click iPhone video converter: Guide on DVD to iPhone conversion

 

How to view local PDF, DOC, XLS, TXT and others with Safari in iPhone

So I can see that some guy nicknamed lymnjuice has figured out how to get video streaming on iPhone. He wrote a web application in PHP in an external server (probably his own PC) and is able to access it through Safari in iPhone by typing the address to his local Apache/PHP server. Pretty simple, but this already gives some ideas for future development.

A while back I did something (somewhat) similiar, but instead of using an external server, why not just use lighttpd, which can be installed directly into iPhone?

Here is a little step-by-step:

PS: I’m using Windows, so I’m doing this with iBrickr. With that you can upload files into anywhere on the iPhone and easily install 3rd party packages and apps. I’m guessing this could be easily done in a Mac using iFuntastic.. not sure.. but pretty sure :)

1) With the Installer app, install lighttpd, which is a very light http web server.

2) With iBrickr, download the file /usr/local/etc/lighttpd.conf into a local folder in Windows. Edit the file and add the following line to it:

dir-listing.activate = “enable”

3) Upload it back to the original directory and restart iPhone (or just lighttpd, if you have the Ulctl app installed.

This allows the browser to view all local files in your file system, which starts at the default document root directory /private/var/root/Sites/ in your iPhone.

Now, all you have to do is point Safari do the usual http://127.0.0.1 , but remember there is a file called “index.html” which was installed with the lighttpd package. This default file contains a “hello world” showing a nice — but useless — picture of an iPhone.

If you erase that file, Safari will create a default HTML that lists all the contents of that directory. Now you can navigate to and access any file that is placed in that folder.

You can place eBooks that are in PDF/HTML formats, Word documents (including Word 2007 *.docx documents), Excel spreadsheets, MP3/WAV files… whatever Safari can handle in iPhone.

As a result, this allows you to use your iPhone to read books, access files and references quickly with very high quality and fidelity to the original documents. Of course, this is all valid if you don’t care about the crappy-textual navigation provided by lighttpd. You still won’t be able to edit any files, since there is no support for that inside a simple browser. But it sure gives a great document viewer (especially for PDF files, which look EXACTLY the same as they do on your PC!)

As a suggestion to developers out there, one could be clever enought and prepare lighttpd to execute PHP or Python scripts, which are also available for download via Installer app inside the iPhone! With some simple work and time in your hands you can start writing apps for the iPhone that can run locally. Some ideas and starting points could be:

  • YouTube proxy, converting youtube videos (and/or other video sites) into a video format that can be streaemed through Safari.
  • Alternative video/music library manager to be used instead of iTunes. Playlists could be dynamically generated using PHP and — as of this moment — MP3 files can be easily streamed through Safari.
  • Integration with existing services, such as Flickr, Orkut, Digg, Google Reader, eBay, Amazon…

Even though possibilities are endless, you can’t beat the nice native SDK Apple uses to create smooth awsome widgets… but anyway… this presents itself as an alternative to iPhone development as long as Apple keeps iPhone SDK closed behind doors.

From http://juliohm.blogspot.com/2007/09/how-to-view-local-pdf-doc-xls-txt-and.html

del.icio.us | Digg it | Give a Link | iFeedReaders | Yahoo MyWeb |

Leave a Reply