You can read lots about it here https://discussions.apple.com/thread/3404857?start=1125&tstart=0
I would recommend the following steps.
1) Take a deep breath, the process of having an iPhone replaced can really suck, mostly because you shouldn't have to do it, but also because it's a smart phone and there's some dumb users. Apple doesn't make a habit of replacing good phones.
2) Do a backup of the phone. Connect the phone to iTunes when it shows up, right click (mac = 2 finger click) and select backup.
I believe you can backup with iCloud instead, but I'm not familiar with the process so cant give any pointers there.
3) Restore the phone with iTunes (this wipes everything and starts again), set it up as a new phone (don't use the backup this time). Put as little on as possible, just contacts and anything you NEED to get by for a bit.
Once it fails again (hopefully fairly soon) phone Apple directly. 00800 7666 7666 (Free call to Australia)
Apple is going to ask you to backup and restore like they ALWAYS do, hopefully when you say "I already have" they'll talk through what you did and with any luck accept it as done.
Hopefully, in the end, you will be told to go back to the place of purchase and get a replacement. Be sure to get the apple case number and take it with you
Tell the person instore what the phone is doing, you've been talking to Apple, they've said to get it replaced, here's the apple case number.
Some notes:
-If apple make you to restore the phone again, you probably won't need to do a backup again provided there's nothing new and important on it.
-You could just go to the place of purchase and talk to them, you might get lucky. If you do, be sure you've backed up the phone or you might loose everything. Personally I'll always phone Apple first.
-You can skip the backup and restore steps to begin with, but Apple will ask you to do it. I do it first, convince them I did it properly, and get it all sorted in one phone call.
-Apple don't repair, they replace.
-Plan to be without the phone for up to a week. Unless you get super lucky, it'll get sent to Auckland, assessed, and a replacement sent back.
Good luck