The Book on Salutations and Greetings (Kitab As-Salam)

Muslim :: Book 26 : Hadith 5540

Safiyya reported from some of the wives of Allah's Apostle (may peace be upon him) Allah's Apostle (may peace be upon him) having said: He who visits a divner ('Arraf) and asks him about anything, his prayers extending to forty nights will not be accepted.

Source materials are from the University of Southern California MSA site
Hadith eBooks converted from Imaan Star