I have bought an used iphone 3g for my girlfriend off a random guy who advertised he is selling it, i think it had 3.1.3 firmware, and i've tried to upgrade the firmware on itunes and it apparently failed and restoring it has failed too, giving an "1015" error for some reason... any idea how to fix this? Been trying to fix this for like 5 hours now and nothing i've tried has solved the issue... Now she's left without a phone since i messed it up. Anyone please have an idea how to fix this?

Thanks a lot