I want to know that Quran says that only Allah knows the Unseen. But i found out in a hadith that Prophet PBUH told us that Jinn the fortuneteller a part of truth and then fortune teller mix it with a hundred lies and tells to us , In another hadiths Prophet PBUH tells us that Astrology is only based on lies " Sun and Moon are only Signs of Allah"
So How does Jinn tells the fortune while only Allah knows the Fortune?.
Knowledge of the unseen is something that Allaah has kept for Himself, as is indicated by the texts of the Qur’aan and Sunnah. Allaah says (interpretation of the meaning):
“Say: “None in the heavens and the earth knows the Ghaib (Unseen) except Allaah, nor can they perceive when they shall be resurrected”
“And with Him are the keys of the Ghayb (all that is hidden), none knows them but He. And He knows whatever there is in the land and in the sea; not a leaf falls, but He knows it. There is not a grain in the darkness of the earth nor anything fresh or dry, but is written in a Clear Record”
The Prophet (peace and blessings of Allaah be upon him) explained these keys as referring to five things which are mentioned in Soorat Luqmaan, where Allaah says (interpretation of the meaning):
“Verily, Allaah, with Him (Alone) is the knowledge of the Hour, He sends down the rain, and knows that which is in the wombs. No person knows what he will earn tomorrow, and no person knows in what land he will die. Verily, Allaah is All‑Knower, All‑Aware (of things)”
Al-Bukhaari narrated in his Saheeh (hadeeth no. 4477) that ‘Aa’ishah (may Allaah be pleased with her) said: “Whoever tells you that he knows what will happen tomorrow is lying.” Then she recited, “No person knows what he will earn tomorrow.”
But with regard to this matter it is important to know what is the unseen the knowledge of which Allaah has kept to Himself, because al-ghayb (the unseen) means that which is not seen, and that which is not seen may be either that which is not seen by all of creation – both those who are in the heavens and those who are on earth – this kind of unseen is known to no one but Allaah, and this is that which is called al-ghayb al-mutlaq (the unseen in the absolute sense); or this unseen matter may be unseen for some people, and known to some others. This is called unseen for the one who is ignorant of it, but it is not unseen or unknown to all people, and knowledge of it is not unique to Allaah. Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said in Sharh al-‘Aqeedah al-Waasitiyyah (p. 158): What is meant by the unseen is that which is not seen. The unseen is something relative. But that which is unseen in the absolute sense (al-ghyab al-mutlaq) is known only to Allaah. End quote.
What fortune-tellers say of things that will happen in the future has nothing to do with the unseen or with knowledge of the unseen, and it is not knowledge of what will happen in the future. Rather they are liars who make false claims. But the Prophet (peace and blessings of Allaah be upon him) has told us that they steal knowledge of that which Allaah has revealed to His angels. It was narrated that ‘Aa’ishah (may Allaah be pleased with her) said: Some people asked the Prophet (peace and blessings of Allaah be upon him) about fortune-tellers, and he said: “They are nothing.” They said: O Messenger of Allaah, they say something and it comes true. The Prophet (peace and blessings of Allaah be upon him) said: “That is a word of truth which the jinni snatches and cackles into the ear of his familiar like the cackling of a hen, and they mix more than one hundred lies with it.” Narrated by al-Bukhaari (7561).
The Prophet (peace and blessings of Allaah be upon him) explained how the jinn steal this word. He said: “…when our Lord, may His name be blessed and exalted, decrees some matter, the bearers of the Throne glorify Him, then the people of heaven who are closest to them glorify Him, until the tasbeeh reaches the people of the lowest heaven. Then those who are nearest to the bearers of the Throne say: What did your Lord say? And they tell them what He said. And the people of heaven ask one another for the news, until the news reaches the lowest heaven. Then the eavesdropping jinn snatch what they can and convey it to their familiars. What they narrated as they heard it is true, but they add lies to it.” Narrated by Muslim (2229).
From this it is clear that the jinn do not have knowledge of the unseen, rather they steal words that they hear from the angels, but the angels themselves do not have any knowledge of that unless Allaah tells them of it. After they are told of it, it is no longer regarded as unseen in the absolute sense, but before that they are like anyone else in creation and do not know anything of the unseen. This depends on Allaah’s telling them of it. Allaah says (interpretation of the meaning):
““(He Alone is) the All‑Knower of the Ghayb (Unseen), and He reveals to none His Ghayb (Unseen)”
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said: The noblest of the angelic Messengers, Jibreel, asked the noblest of the human Messengers, Muhammad (peace and blessings of Allaah be upon him), “Tell me about the Hour.” He said: “The one who is asked about it is does not know any more about it than the one who is asking” meaning, just as you have no knowledge of it, I have no knowledge of it either. End quote.
Sharh al-‘Aqeedah al-Waasitiyyah, p. 158
And Allaah knows best.