Is your iPhone not charging? You have tried pushing the cable harder, keeping the phone in many random positions and sometimes the phone starts charging. Thinking that the problem is with the lightning cable, you may have even bought a new one or tried your friend's cable just to find that the same problem exists!
If this is the case, the problem usually is with the lightning port you have in your iPhone. One of the simplest remedy you can try is to clean the port using a tooth pick. Take a toothpick and try picking out dirt accumulated within the port. You might sometimes be surprised with the amount of dirt that may come out. (I was, when I faced the same problem and tried this out) Use the tooth pick carefully so that you don't damage the connections within the port. It won't get easily damaged unless you show all your frustrations on the toothpick.
Once you got all the junk out of the port try blowing into the port just to make sure the port is clear and you may try plugging in your lighting charger. Hopefully it should start charging your phone.