Trying to know something in advance may not necessarily be against Islam as sometimes a prior warning of things helps one plan his moves in a better way. It is only the means of trying to know something in advance that may be unlawful.
For example, the Prophet (Pbuh) while returning from the front of Ahzab turned towards the Jewish tribe of Quraidha, who had betrayed the faith and broke the agreement at the time of crisis. He sent a group of companions ahead of the army to know the activities and preparedness of Bani Quraidha. They rushed ahead and joined back to feed the Prophet (Pbuh) with the necessary information before he reached there.
The point I want to emphasize is that it is not unlawful (sometimes advisable) to know something in advance.
Basically of the knowledge of Ghaib (concealed). Quran has explicitly declared:
“Say: None in the heavens or on earth except Allah knows what is hidden...” (27:65).
However there is much misunderstanding over the apprehension of the word Ghaib. A Ghaib for one may not be Ghaib for another.
The Prophet (Pbuh) said:
“Had you known what I know, you would have wept much and laughed a little”.
Though it is specifically mentioned in Quran that he too did not possess the knowledge of Ghaib:
(Say: O Prophet... and I do not know what is hidden... 6:50),
The Prophet (Pbuh) was given more knowledge than others, which means some of what was Ghaib for others was not Ghaib for him.
Again, a thing of Ghaib at a time may not remain Ghaib on some other time. What was happening at a particular time in
Through some Riadh (intense practice) some people (Tibetan Lamas) have known to develop a power of seeing (not through eyes) things of distant places. Up to the range their extraordinary powers reach, it does not remain Ghaib for them while it is still Ghaib for those who do not possess such faculty.
Allah has established Rules and Laws in this universe, which never change. With the increase in knowledge, the man is continuously discovering those rules to know and plan the things of future. To know the things of future on the basis of such established rules whose accuracy has been proved by experience, is not the knowledge of Ghaib and is not only permitted but on most occasions desirable. It is trying to peek into future through speculative means or inaccurate methods, which is prohibited.
The palmistry has not till date become an exact science. Go to two different palmists and they will tell you different things. It is prohibited to believe in such predictions (of Ghaib) because the inaccurate predictions with a mixture of right and wrong make a man superstitious. It does more harm than benefit to the individuals and the society. If and when an occult science of today will become so accurate and exact a science through the discovery of exact rules of nature that all its practitioners start predicting accurately without using speculation, it will become lawful.
However the predictions through palmistry may never be permissible. It is experienced that the lines of hands have some relation to the events of past and future but in case of palmistry it has been established that the lines may be governed by the events to come but not the vice versa. The events are not governed by the lines of hand. The lines may be an indication of a future happening (if the palmist can read accurately, which he is unable to do till date) but if the happening (or fate) is to change, the lines have been observed to undergo changes overnight. Therefore to believe in palmistry for the planning of future will always be futile, superstition, fatal and unlawful.
It must remain clear that there are some things, which, according to Quran, man will never be able to know. They will always remain in Ghaib for mankind no matter how much knowledge he acquires. For example two such things have been mentioned in the last verse of Surah Luqman.
“..And no one knows what he will earn on the next day and no body knows in which land he is to die...”(31:34).
To try to know these through any science, occult or exact will always remain unlawful.