Set User-Agent to fix gist imports

This commit is contained in:
Brian Adams 2013-06-26 12:00:59 -05:00
parent 213c12c545
commit 5f9b7420af
1 changed files with 1 additions and 0 deletions

View File

@ -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);