
the file containing your iphone's text messages resp. address book entries is stored on your computer within itunes' backup folder:C:\Documents and Settings\[your username]\Application Data\Apple Computer\MobileSync\Backup\[some id]\
and search for a file named 3d0d7e5fb2ce288813306e4d4636395e047a3d28.mddata. note: the file's extension could also be .mdbackup instead of .mddata or even be empty.home/Library/MobileSync/backup/[some id]/ but better just try searching it with spotlight.
.mdbackup.
C:\Documents and Settings\[your windows login name]\Application Data\Apple Computer\MobileSync\Backup\[some id]\ <data> tag which contains the backup content encoded in a sqlite v3 database format.
using php's built-in sqlite functionality it's a simple task to extract the actual data out of that iphone sms backup file then.C:\Documents and Settings\[...]21ae31eddf\>grep -l sms.db * in the itunes backup folder.