Created
May 29, 2014 11:34
-
-
Save nand2/1dc30b5081ba9b772516 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Config | |
$base_api_url = "https://www.betarigs.com/api/v1"; | |
$rig_id = 4737; | |
echo "[" . date('Y-m-d H:i:s') . "] Getting infos about rig $rig_id ...\n"; | |
$url = $base_api_url . '/rig/' . $rig_id; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); | |
$result = curl_exec($ch); | |
$rig_data = json_decode($result, true); | |
print_r($rig_data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment