Iphone 5 charger doesn't work?

I recently bought an offbrand ( not apple ) iphone 5 charger, and it will not charge my phone? I'm in need of a new one and would like to find a cheaper one online but worried about getting another off brand charger that doesn't work. Is there some software on the 5 that doesn't allow offbrand chargers?

You bought a knockoff. What did you expect.

Try buying a new chord on amazon, look at where its shipped from, make sure it isn't shipped from china. I use an offbrand and have never had a problem but I always check where its shipped from, not that its a fail safe method as others can order from china then ship from that location, but it helps limit problems.

Use authentic apple chargers next time knockoffs don't always work plus a new charger chord is real cheap on amazon

It may not be the charger.
I had a similar problem with my apple brand charger from my iPhone 4, would not charge my iPhone 5.
check to see if it will charge other devices, mine did.
After getting tech support from apple, my phone is only 5 weeks old, they had me
backup
restore as new phone
then restore my phone

they say this restores the firmware! Sounds a little weird but it did resolve my charging issue.
my phone now will charge with the other charger and all extra cables i've bought.