Displaying posts 1
to 10
of 152.
Hey Mike!! Greetings from Kashiwa.
/**
* Requires libcurl
*/
$curl = curl_init();
$payload = "grant_type=authorization_code&code=string&redirect_uri=string";
curl_setopt_array($curl, [
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded",
"Authorization: Basic " . base64_encode("<username>:<password>")
],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_URL => "https://wwwcie.ups.com/security/v1/oauth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$error = curl_error($curl);
curl_close($curl);
if ($error) {
echo "cURL Error #:" . $error;
} else {
echo $response;
}
* Requires libcurl
*/
$curl = curl_init();
$payload = "grant_type=authorization_code&code=string&redirect_uri=string";
curl_setopt_array($curl, [
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded",
"Authorization: Basic " . base64_encode("<username>:<password>")
],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_URL => "https://wwwcie.ups.com/security/v1/oauth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$error = curl_error($curl);
curl_close($curl);
if ($error) {
echo "cURL Error #:" . $error;
} else {
echo $response;
}
Hello would you like to be my pen pal if so write in my inbox how are you doing :)
Please Sign In
or Join for Free
to view the rest of this profile.