Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $curl = curl_init();
- // Set url
- curl_setopt($ch, CURLOPT_URL, 'https://xpw1.no-ip.org:8443/server/console');
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- // Set method
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
- // Set options
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- // Set headers
- curl_setopt($ch, CURLOPT_HTTPHEADER, [
- "X-Access-Server: <PRIVATE>",
- "X-Access-Token: <PRIVATE>",
- ]
- );
- $response = curl_exec($curl);
- $err = curl_error($curl);
- curl_close($curl);
- if ($err) {
- echo "cURL Error #:" . $err;
- } else {
- echo $response;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement