Here is an aspx example of retrieving incoming SMS reply data via the API, and saving the results to two files, one consisting of the raw xml, and the other a comma-delimited presentation of the data (csv file).
The user is able to define the file name, to which the server date and time and file extension ( ".csv" or ".xml") is appended . Both files are saved in the same directory as the aspx page.
The complete form data is retrieved, but no changes are made (e.g. deleting or marked as read)
Please note, this is an unsupported example. Please feel free to review and modify to your requirements.