So, I\'m working on a PHP script, and part of it needs to be able to query a website, then get text from it.
First off, I need to be able to query a certain website
The easiest way:
file_get_contents()
That will get you the source of the web page.
You probably want something a bit more complete though, so look into cURL, for better error handling, and setting user-agent, and what not.
From there, if you want the text only, you are going to have to parse the page. For that, see: How do you parse and process HTML/XML in PHP?