I hereby claim:
- I am joshdutcher on github.
- I am joshdutcher (https://keybase.io/joshdutcher) on keybase.
- I have a public key ASA454ROyuy0-4VTJYJxAQcL52rgBip3bkhSO4pAVJnz3go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// of course there is actually more to the code than this but here's the relevant part | |
function getRubiconRecon($date,$freq) { | |
$key = "************************************"; | |
$secret = "************************************"; | |
$url = "https://api.rubiconproject.com"; | |
$acct = "*****"; | |
$request = "/sellers/api/reports/v1/$acct?columns=Site_Name,Site_ID,Performance_NetworkImps,Performance_FillRate,Traffic_Impressions,Performance_NetworkRevenue,Performance_ECPM,SiteData_KeywordMapped&source=standard&start=$date&end=$date"; | |
$options = array('timeout' => '30', 'auth' => new Requests_Auth_Basic(array($key, $secret)), 'filename' => 'rubicon_body.txt'); | |
$headers = array('Accept' => 'application/json', 'Content-Type' => 'application/json'); |
function debug($content, $comments=false) { | |
$backtrace = debug_backtrace(); | |
$calling_file = $backtrace[0]['file']; | |
$calling_line = $backtrace[0]['line']; | |
if ($comments) { | |
// prints the content inside an html comment, requiring user to view source to read it | |
$prefix = "<!--" . "\r\n" . $calling_file . " line " . $calling_line . "\r\n"; | |
$suffix = "\r\n" . "-->" . "\r\n"; | |
} else { |
function time_elapsed() { | |
$backtrace = debug_backtrace(); | |
$calling_file = $backtrace[0]['file']; | |
$calling_line = $backtrace[0]['line']; | |
$call_string = $calling_file . ' line ' . $calling_line . '<br/>'; | |
static $last = null; | |
$now = microtime(true); |