Skip to content

Instantly share code, notes, and snippets.

@masugadesign
Created January 21, 2011 20:29
Show Gist options
  • Save masugadesign/790362 to your computer and use it in GitHub Desktop.
Save masugadesign/790362 to your computer and use it in GitHub Desktop.
Developers get purchased item info in JSON format.
<?php
$username = ""; //enter your username here
$password = ""; //enter your password here
$start_dt = "2011-01-01"; start date in YYYY-MM-DD format
$end_dt = "2011-12-31"; end date in YYYY-MM-DD format
// Create the post string
$post_string = "username=".$username."&password=".$password."&start_dt=".$start_dt."&end_dt=".$end_dt;
// Process
$url = "https://devot-ee.com/api/orders/";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$post_string);
$response = urldecode(curl_exec($ch));
$arr = json_decode($response,true);
// The order details are now available in
// and assoc array $arr
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment