file_get_contents

The use of file_get_contents within PHP is not allowed on our Web hosting platforms due to security reasons we advise all customers to use CURL, an example can be found below;

function file_get_contents_workaround($url)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_URL, $url);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
  • 918 Users Found This Useful
Was this answer helpful?

Related Articles

When will my Web Hosting be Setup?

All web hosting accounts are setup instantly once payment has been received.

What DNS servers do I point my domains to?

Our DNS servers are; ns0.exascale.co.uk ns1.exascale.co.uk

I've had no emails from you?

In some rare cases your ISP or email provider will mark our emails/invoices as SPAM. If your...

Why choose Exascale Shared Web Hosting?

Exascale are one of the UK's leading premium Managed Web Hosting company providing to Personal...

Why don't you offer Unlimited Bandwidth?

There is no such thing as unlimited bandwidth. Any web hosting company that...