Skip to content

Instantly share code, notes, and snippets.

@alexbilbie
Created May 30, 2012 12:13
Show Gist options
  • Save alexbilbie/2835898 to your computer and use it in GitHub Desktop.
Save alexbilbie/2835898 to your computer and use it in GitHub Desktop.
<?php
$context = stream_context_create(array('http' => array('timeout' => 10)));
try
{
$eprints_response = file_get_contents('URL HERE', FALSE, $context);
}
catch (Exception $e)
{
$eprints_response = NULL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment