You can run a web application offline by using your computer as a server, you can get PHP stacks like the ones listed below that run apache, php and mysql.
- Windows: WAMP, AMPPS
- Mac: XAMP, MAMP
Then, you can save all your important data to a CSV file, and once your online your script can push the CSV data to your remote web server.
You can check if your online by pinging google or something.