It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever learns something of the knowledge of the stars (astrology) has learned a branch of magic; whoever increases (in it) increases (in magic), whoever increases (in it) increases (in magic)."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11231