Praise be to Allah.
Firstly: if a relative or close friend dies in another country, a person may travel to attend the funeral prayers if that is easy to do. There is nothing wrong with this travelling because it is travelling for a legitimate purpose, even though this action was not known among Muslims in the past. It was not done in the past because they were not able to do that, unlike today when travelling has become easier with faster methods of transportation.
With regard to offering the funeral prayer for the deceased in absentia, there is a great deal of difference of opinion among the scholars on this matter, because it is not reported that the Prophet (peace and blessings of Allaah be upon him) did that, except in the case of the Negus (ruler of Abyssinia), and it was not narrated that the Muslims outside of Madeenah prayed for the Prophet (peace and blessings of Allaah be upon him) in absentia when he died, even though their love for him was so great.
Also, it is not reported that the Muslims prayed in absentia for any of the khulafaa’ al-raashideen (the rightly-guided khaleefahs, the first four leaders of Islam after the Prophet (peace and blessings of Allaah be upon him)) when they died. Prayer for the dead in absentia was not known among the Muslims even though circumstances might have dictated it, such as the eagerness of the Muslims to do something of benefit for their brothers, especially those who were held in high esteem by all the Muslims, or one to whom one is related or who one is fond of, which would make one seek to do something good for him by praying for him. For this reason, scholars such as Shaykh al-Islam Ibn Taymiyah were of the view that the fact that the Prophet (peace and blessings of Allaah be upon him) prayed for the Negus was an exceptional case which applied only to him, because there was no one in the land where he died who could offer the janaazah prayer for him. In my view, this is a sound view in the light of the above. Some scholars say that the funeral prayer in absentia may be offered only for certain people among the ummah, such as famous scholars and just rulers; this view is close to the previous view.
On this basis, there is no reason why the funeral prayer should not be offered for the deceased both when one is present and in absentia.
Gathering to read Qur’aan and give the reward for that to the deceased is a bid’ah (reprehensible innovation), even if it is not done in return for any payment. If it is done in return for payment then it is haraam, because it is being done for a reason other than for the sake of Allaah, and any such action will not earn any reward. But if a person reads Qur’aan by himself and gives the reward for that to a relative or friend, without gathering with others for that purpose and without seeking payment, then there are two scholarly views in this case, one of which says that it is permissible and that the reward for the reading will reach the deceased.
The second view is that it is not prescribed to give the reward for the reading to anyone, because there is no evidence (daleel) to indicate that this is prescribed.
If the family of the deceased have a special reading, and invite people to a meal three days and forty days after the death, this is bid’ah (reprehensible innovation).
And every bid’ah is a going astray. The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Whoever invents something in this matter of ours (i.e., Islam) that is not a part of it will have it rejected.” The action mentioned is a matter that has been invented in the religion, so it is to be rejected, and the one who does it is a sinner and will not be rewarded.
What people say about the soul of the deceased visiting the house after forty days to get the reward is a lie which has no basis. The person who told you that the Prophet (peace and blessings of Allaah be upon him) and his Companions did not do any of these things was right. You did well to ask about the things of which you were unsure, and your eagerness to know the Sunnah of the Prophet (peace and blessings of Allaah be upon him) and act accordingly is highly commendable. This is how the Muslim should be; his concern should be to know the truth so that he can follow it, and know what is false so that he can avoid it.
We ask Allaah to make us and you steadfast in following the Straight Path. May Allaah bless our Prophet Muhammad and his family and companions, and grant them peace.