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
You can use file_get_contents or if you need a little more control (i.e. to submit POST requests, to set the user agent string, ...) you may want to look at cURL.
file_get_contents Example:
$content = file_get_contents('http://www.example.org');
Basic cURL Example:
$ch = curl_init('http://www.example.org');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3');
$content = curl_exec($ch);
curl_close($ch);