I think owaters wants to test whether a home server is online or offline, using a public server to do so.
file() returns FALSE on failure, so try something like this:
if file('http://your.home.server/')
echo "It's up.";
else
echo "No way.";
Warning: This will BLOCK until a timeout failure, and will have an adverse effect on page behavior.