My iphone will only charge in certain positions?

Will Apple replace this for free? My phone's in good condition(one tinny crack) but works fine. It just won't charge well >.<

Unless your phone is less than a year old or you have the extended Applecare protection plan they will not replace it for free. Sounds like it has been dropped before and the charge connector port is probably jarred loose. That's why it only works in certain positions. You need to inspect it and probably put it back into place or replace it. This will show you how.
Best luck.
http://www.imore.com/...t-iphone-5

A "tiny crack" does not mean good condition. It means you dropped it.

Simple answer get a new charger.