The Shulchan Aruch writes (225:1) that when someone meets a friend he hasn't seen in 30 days, he should make a birchas shehecheyanu (with shem Hashem). This bracha should only be made when it is a person that truly creates simcha when you meet them, after having not seen them for 30 days, such as a close friend or family member. If however, you have communicated with this friend (e.g., via phone/letter) or if a third party has told you that your friend is alive and well, you should not make a bracha upon seeing him after 30 days.
On a similar note, the Shulchan Aruch writes (225:1) that when someone meets a person he has not seen in 12 months, he is obligated to recite a birchas mechaye hamesim (also with shem Hashem). In these instances, a shehecheyanu should not be made.
The Piskei Teshuvos writes that many poskim hold that nowadays these brachos should only be made with the shem Hashem in extreme circumstances (e.g. one who hasn't seen his child in a few years and did not know his whereabouts; someone who had not been seen due to a severe medical condition for an extended period of time). He brings down from the Steipler (1:93) that since we have telephones, even if you have not heard from someone in 30 days or even a year, since you know that if anything bad had happened to that person you would find out about it, these brachos should not be made with the shem Hashem. Rather, the Piskei Teshuvos writes that when people are in these types of situations, they should say a generic bracha (without shem Hashem) of "Baruch Hashem we are able to see each other again."