As contagious said, a try/catch function works well if the function throws an exception. But, I think what you are looking for is a good way to handle the result of a function returns your expected result, and not necessarily if it throws an exception. I don't think file_get_contents will throw an exception, but rather just return false.
Your code would work fine, but I noticed an extra ; in the first line of your if statement.
if (file_get_contents("http://www.address.com")) {
$results = "it worked";
} else {
$results = "it didnt";
}
return $results;
Also, you can store the result of a function call into a variable so you can use it later.
$result = file_get_contents("http://www.address.com");
if ($result) {
// parse your results using $result
} else {
// the url content could not be fetched, fail gracefully
}