Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrated that a ruqyah (incantation) for a sting (a poisonous bite) was mentioned in the presence of the Prophet (peace and blessings be upon him), so he (peace and blessings be upon him) said: "Present it to me." So they presented that ruqyah to him: "Bismillah, shajjah qarniyyah milhah bahr qafta." Then he (peace and blessings be upon him) said: "These are covenants that Sulayman bin Dawud (peace be upon him) took from the venomous creatures, and I see no harm in it."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10014