PHP script to search SMS on the iPhone
You’ll probably want to read about installing lighttpd and php on the iphone before reading this post.. You’ll need to have done that if you want to use this script
I decided to throw together a half-decent script for the iPhone. The script uses php, lighttpd which you’ve installed yourself using the instructions in my previous post and uses the built in sqlite3 engine to query the SMS database that the iPhone stores.
The script allows you to search through any SMS stored on the phone based on words included in the text or a full/partial phone number. It’s sloppy, quick and ugly.. it’s just to prove how easy and relatively simple it is. Spend years trying to develop apps for the iPhone or just install PHP and do it in a matter of hours… you decide.
Right now, you still have to manually start lighttpd via ssh when logged in as root.
Screen shot from the iPhone of doing a search for any text message including the word ‘late’:
First column is from phone number, next column is an ID assigned to the message then the text itself.

Script source code: Source code text file
Usage:
1) Create a new folder in /htdocs/ called sms — ( mkdir /htdocs/sms )
2) Save script as /htdocs/sms/index.php
3) Access script through safari on the iphone


