Skip to content

Instantly share code, notes, and snippets.

@b1nary
Last active October 13, 2015 16:56
Show Gist options
  • Save b1nary/8f45ce9c988e6e8cc726 to your computer and use it in GitHub Desktop.
Save b1nary/8f45ce9c988e6e8cc726 to your computer and use it in GitHub Desktop.
<?php
// Force errors
error_reporting(E_ALL);
ini_set('display_errors', 1);
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, "https://poloniex.com/public?command=returnTicker");
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// Output
var_dump($output);
// close curl resource to free up system resources
curl_close($ch);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment