mirror of
https://github.com/seigler/neat-charts
synced 2025-07-27 01:16:09 +00:00
removed some garbage from pasted code
This commit is contained in:
parent
07bb92ffbf
commit
d430e3c749
1 changed files with 3 additions and 8 deletions
11
Util.php
11
Util.php
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
// https://poloniex.com/public?command=returnChartData¤cyPair=BTC_XMR&start=1466740210&end=9999999999&period=300
|
||||
|
||||
class Util {
|
||||
public static function getJson($url) {
|
||||
|
@ -11,14 +10,12 @@ class Util {
|
|||
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
|
||||
# curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
|
||||
# curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
||||
# curl_setopt($ch, CURLOPT_CAINFO, getcwd() . "/VeriSignClass3PublicPrimaryCertificationAuthority-G5.pem");
|
||||
# curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
|
||||
# curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
||||
# curl_setopt($ch, CURLOPT_CAINFO, getcwd() . "/VeriSignClass3PublicPrimaryCertificationAuthority-G5.pem");
|
||||
|
||||
$result = curl_exec($ch);
|
||||
// $result = file_get_contents('https://api.flickr.com/services/feeds/photos_public.gne?id=50219999@N00&tags=Sketches&lang=en-us&format=json&nojsoncallback=1');
|
||||
$result = json_decode($result) or trigger_error('Couldn\'t parse JSON');
|
||||
# foreach ($result->items as $item) { }
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -35,6 +32,4 @@ class Util {
|
|||
}
|
||||
return $median;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue