First, you have to enable the common PHP setting if the server setup by your self in VPS/Dedicated server.
You can also get the content from URL using the CURL method. It is proper method compare to file get contents because it provide more settings.
Notes: CURL setting must be enable on your server.
// Initiate curl session in a variable (resource)
$curl_handle = curl_init();
$url = "http://dummy.restapiexample.com/api/v1/employees";
// Set the curl URL option
curl_setopt($curl_handle, CURLOPT_URL, $url);
// This option will return data as a string instead of direct output
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);
// Execute curl & store data in a variable
$curl_data = curl_exec($curl_handle);