Hello and thank you for using JustAnswer
Your only option is to connect your iphone to the computer you normally connect it to, right click on the iphone icon and select Restore From Backup then select the most recent back up (or the backup where you have your contacts and photos) and click restore.
That is your only option to restore the iphone to get your photos and contacts back. There is no other way.
Let me know if this helps, thanks.
Hello again, I see you have attempted to rate without responding. Do you have any questions for me?