Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header("Content-Type: application/json");
- if (!isset($_GET["key"])) {
- echo '{"access_denied": "No "Key" parameter"}';
- exit();
- }
- if ($_GET["key"] == "ABC123") {
- if (isset($_GET["tag"])) {
- $access_token = "ZQAAAV6_P0s91qJHYoCz_QpKMUZZuC8_Tnp1r5_KbnJUeXOxxKbMyHVpysVj0bkvl3sq6jK2J2QDqwLBMZ7Dz1hwRxeIgTlXr9TIBAei6aCfOcJW";
- $Client Secret = "dXfFK2WDKbqvq1x0_F1kT9kub2hALrRP";
- $client_id = "228534290";
- $redirect_uri = "http://sample-env.5fphmhwmwf.us-west-2.elasticbeanstalk.com";
- $headers = array("Authorization: Bearer " . $access_token);
- // Initiate connection with API
- $ch = curl_init("https://auth.band.us/oauth2/authorize?response_type=code&client_id=" .$client_id. "&redirect_uri=" .$redirect_uri);
- // Set the Authorization header
- //curl_setopt($ch, CURLOPT_HTTPHEADER);
- // Execute the request (which also echo's it to the user)
- curl_exec($ch);
- // Close request
- curl_close($ch);
- } else {
- echo '{"error": "No "tag" parameter!"}';
- }
- } else {
- echo '{"access_denied": "Incorrect Key"}';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement