If you met on an Internet forum with someone who gave you advice in a difficult moment, to say "thank you", simply click the corresponding button in the profile or in the beginning of the topic. Don't forget at least mentally "push" this button in real life.
Say thank you old friend, helping you in the lurch as it is customary in your circle. Perhaps what you are after hard cases and collaboration used to go to the bath, in a restaurant or go to barbecues. Take this time to spend a but before that consult about it with your friends: what they say. Or give him an exclusive thing, in your possession, of which he had long dreamed of. Not furnish the giving of this gift as something out of the ordinary. Between the old friends for the ceremony is not accepted.
If you helped the person with whom you are in regular friendly relationship or working together, expensive gifts should not be done. This may confuse people as it is possible that he acted unconsciously, or in obedience to a momentary impulse. You can limit to a simple heartfelt gratitude, and in any case not to tell him that you were friends forever. To become friends at one point, we need some really extraordinary circumstances.
Do not forget each time to thank the strangers, which you timely support. In no case do not offer them money, not to offend. This is only possible between close friends, and as a token of gratitude and is a sign of a close relationship. And don't say to your friends "thank you" for no reason.
If you helped a friend with whom you have not seen, ask first how he's doing, find out what he lives and what he does. Remember how he was before. And then give thanks. Time changes people, but if your friend once could not tolerate deliberate gratitude, and was always happy to help just tell him "thanks" and renew relationships.