What I want to know is as the title says, if there is a way in PHP to get(or fetch) the URL history from an IP address.
The browser stores the URL history. What you are asking is protected against in browsers to protect users from identity theft and invasion of privacy as well as PC security. An IP address is an address, similar to a home address, that is assigned to all who connect to the Internet and has nothing to do with Internet history. Honestly you ought to be flogged for asking this as that it would be highly illegal an inethical, even if it were possible.