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
/* | |
To automate phantomjs using jQuery | |
See also: https://github.com/ariya/phantomjs/blob/master/examples/page_events.js | |
*/ | |
var url = 'http://www.sample.com'; // start url | |
var eval_code = function() { | |
// code to execute here. Use 'page' instance to navigate to other urls if needed | |
$("button").click(); | |
} |
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 | |
/* use this code as a guide for how to fetch bitcoin historical trade data from bitcoincharts, based on Bitstamp.net */ | |
/* historical interval in hours */ | |
define('AVERAGE_INTERVAL', 6); | |
$hist = file("http://api.bitcoincharts.com/v1/trades.csv?symbol=bitstampUSD&start=" . (time() - AVERAGE_INTERVAL * 3600)); | |
if(!is_array($hist)) die("Unable to fetch data .. Try again later!"); |
NewerOlder