Itunes Save songs and photos and stuff?

Ok, I've got an Iphone 3gs and lately I format my PC now I can't sync my music to Itunes because I have to delete everything, How can I save them in my computer again?

1. Use iFunbox to export them to the computer
2. Import them to iTunes
3. Sync your iphone and delete all the the present Data because iTunes will put them again.