Skip to content

Instantly share code, notes, and snippets.

Created August 21, 2014 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2d860bd1c06244578c68 to your computer and use it in GitHub Desktop.
Save anonymous/2d860bd1c06244578c68 to your computer and use it in GitHub Desktop.
--- - 2014-08-21 13:43:42.094486920 +0900
+++ /tmp/nagiosjp-4.0.8.patch.gz.RzHdL10601 2014-08-21 13:43:42.000000000 +0900
@@ -17402,12 +17402,12 @@
+ elseif(function_exists('file_get_contents') && ini_get('allow_url_fopen') == true)
+ {
+ $header = "User-Agent: $UA\r\n";
-+ $opts = [
-+ 'http' => [
++ $opts = array(
++ 'http' => array(
+ 'method' => 'HEAD',
+ 'header' => $header
-+ ]
-+ ];
++ )
++ );
+ $cn = stream_context_create($opts);
+ if(@file_get_contents($url, false, $cn) !== false)
+ {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment