Created
January 21, 2011 20:29
-
-
Save masugadesign/790362 to your computer and use it in GitHub Desktop.
Developers get purchased item info in JSON format.
This file contains hidden or 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 | |
$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