-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
22 lines (19 loc) · 871 Bytes
/
Copy pathindex.php
File metadata and controls
22 lines (19 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
DEFINE('auth', 'authorization: Bearer ');
$token = ""; //set here you bearer token from honeygain api
function get_url($link,$token){
$ch = curl_init($link);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x32) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4758.102 Safari/537.36 Edg/97.0.1108.56");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
auth.$token,
'Content-Type: application/json',
]);
return curl_exec($ch);
curl_close($ch);
}
echo get_url("https://dashboard.honeygain.com/api/v1/contest_winnings", $token);