Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $header = [
- "Authorization: Basic example_encoded_data",
- "Content-Type: application/json",
- ];
- $ch = curl_init();
- curl_setopt($ch,CURLOPT_URL,$url);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
- curl_setopt($ch, CURLOPT_HEADER, $header);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
- curl_setopt($ch,CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);
- $result = curl_exec($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement