Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require '../vendor/autoload.php';
- use GuzzleHttp\Client;
- $token = $_SESSION['token'];
- $client = new Client([
- 'base_uri' => 'https://api.deezer.com',
- ]);
- if($_POST["title"])
- {
- $response = $client->request('POST', 'playlist/'.$_POST['id'].'?access_token='.$token.'&title='.$_POST['title']);
- $playlist = json_decode($response->getBody());
- if(!empty($playlist)){
- session_start();
- $_SESSION['msg-success'] = "Data playlist berhasil diubah!";
- header("location: index.php");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement