Ben Lee's file_get_contents method only offers to work if allow_url_fopen included in php.ini . Although this option is enabled by default, many (wise) sysadmins disable this flag .
In this case, using curl is the best option .
Since you only ping the remote URL, you do not even need complex options:
$ch = curl_init("http://www.example.com/"); curl_exec($ch);
Although you can have small-scale control over the request and response when using curl if necessary in the future.
Rem.co
source share