Skip to content

Commit

Permalink
hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
veverkap committed Nov 24, 2010
1 parent df9b758 commit 79b4038
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -4,4 +4,5 @@
ehthumbs.db ehthumbs.db
Icon? Icon?
Thumbs.db Thumbs.db
.tmp_? .tmp_?
DMDesktop/.tmp_DMDesktop.html.33674~
Binary file added DMDesktop/icons/user_preview.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions DMDesktopWeb/callbackertest.php
@@ -0,0 +1,31 @@
<?php
function curl_post($url, array $post = NULL, array $options = array())
{
$defaults = array(
CURLOPT_POST => 1,
CURLOPT_HEADER => 0,
CURLOPT_URL => $url,
CURLOPT_FRESH_CONNECT => 1,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_FORBID_REUSE => 1,
CURLOPT_TIMEOUT => 4,
CURLOPT_POSTFIELDS => http_build_query($post)
);

$ch = curl_init();
curl_setopt_array($ch, ($options + $defaults));
if( ! $result = curl_exec($ch))
{
trigger_error(curl_error($ch));
}
curl_close($ch);
return $result;
}
$a = array("grant_type" => "authorization_code",
"client_id" => "dk91QOkPgzChAP8oqBOB5gUKEk8afmDF7demeCtS",
"client_secret" => "8ZgPyMAk2VAWdIFc2qrTXT7lnQxZwVO0XEcvv3RW",
"redirect_uri" => "http://importerama.veverka.net/callback.php",
"code" => $_GET["code"]);
$b = array();
echo curl_post("https://api.dailymile.com/oauth/token", $a, $b);
?>

0 comments on commit 79b4038

Please sign in to comment.