What you're asking is a very wide range of things. First the website would have to be able to accept requests from outside the website and you'd have to know the way it has to be asked.
Even soupousing that you would have to look up sockets to open the internet connection to the website and get the result just like your browser would.
If you're having to ask this you're probably not at a stage where you could do this easily. Take a look at sockets anyway and see.