From 5f9b7420af6859e8356fe71090b9ed1ec45a23dc Mon Sep 17 00:00:00 2001 From: Brian Adams Date: Wed, 26 Jun 2013 12:00:59 -0500 Subject: [PATCH] Set User-Agent to fix gist imports --- proxy.php | 1 + 1 file changed, 1 insertion(+) diff --git a/proxy.php b/proxy.php index fe9d4ff..27e8674 100644 --- a/proxy.php +++ b/proxy.php @@ -6,6 +6,7 @@ if (strpos($url, 'http://', 0) !== 0 && strpos($url, 'https://', 0) !== 0) die() $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); +curl_setopt($ch, CURLOPT_HTTPHEADER, array("User-Agent: Run-PHP-Code")); $content = curl_exec($ch); curl_close($ch);