Sahih Muslim | Book 26 | Hadith Number 5540

Narrated by Safiyya
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 diviner ('Arraf) and asks him about anything, his prayers extending to forty nights will not be accepted.