Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) narrates: I heard the Prophet (peace and blessings be upon him) say: "Whoever goes to an 'arraf' (a diviner or soothsayer), his prayer is not accepted for forty days."
Al-Tabarani recorded it in al-Mu'jam al-Awsat from his teacher Mus'ab bin Ibrahim bin Hamzah al-Dahri, and I do not know him. The remaining narrators of this report are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الطب / 8483