Iphone 3gs with no service, any way to ro transfer photos, and contacts?

I need to transfer all photos, documents and contacts from this iphone to web account. battery is not keeping charge and I have no service for this iPhone. Thanks for your help. Manny
It should be able to plug into computer and sync to iTunes.

Original thread: https://forums.imore.com/threads/iphone-3gs-with-no-service-any-way-to-ro-transfer-photos-and-contacts.357743/