How to get the songs on my iPhone back to my PC?

Basically my PC got wiped
and I lost everything
But all the songs are on my iPhone
So how do I get them from my phone back to itunes.
( I didn't buy these songs btw)

The article introduces how to transfer files between iOS devices and computer, you can follow the partII to transfer your files.
PartII, Transfer files from iOS device to Computer or iTunes
http://www.isoftatoz.com/article/transfer-files-from-iphone-to-computer-itunes.html

If you purchased all of the songs through itunes store, please follow these steps:
1. Open up Itunes and Click on Itunes Store
2. Once you're in the Itunes Store look to right side of the screen and you should see the word "purchased". Click purchased and you'll be sent to a purchase screen.
3. Click on "All Songs" and then it will show all the songs you've downloaded. From there you just hit the button that looks like a cloud with an arrow on it, and it will download all the songs all over again.
If you didn't purchase them through Itunes, then you'll have to download software that will strip the songs from your iPhone/iPod onto your computer. And here is a step by step guide show you how to do that.