Set User-Agent to fix gist imports
This commit is contained in:
parent
213c12c545
commit
5f9b7420af
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue