To fix it, first try to clear the DNS cache in your PC. To do this, go to Start > Run > ipconfig /flushdns. Turn on the phone and enter DFU MODE (hold down the power and the home buttons for 10 seconds and then release the power button while keeping the home button until iTunes says RECOVERY MODE). On iTunes, shift + click the Restore button and select the IPW file. The phone should be restored and everything will work.