How to charge my IPhone when the dock doesn't work?

My IPhone 3GS's dock just went out stopped working. I've tried cleaning it, new cords, restarting, etc. But nothing has worked. This happened before and I had to hold the charger end in a certain position to work, then a little later started working fully again. Now it quit completely. Can anyone help?

Nope. The 3gs dock is too hard to fix. Time to upgrade or replace.