Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function puzzl($token,$code){
- $ch = curl_init();
- //curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
- curl_setopt($ch, CURLOPT_URL, "https://lichess.org/api/user/puzzle-activity");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- $authorization = "Authorization: Bearer ".$token; // Prepare the authorisation token
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-ndjson' , $authorization ));
- $data = curl_exec($ch);
- var_dump($data);
- curl_close($ch);
- unset($ch);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement