Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('display_errors', 'On');
- error_reporting(E_ALL);
- // Generate random amount between .001 and .0015
- $ran1 = mt_rand(100, 150);
- $ran2 = $ran1/100000;
- // Config
- $APIKey = "10636657564a65571683e85b8404e7";
- $APISecret = "e8a81007e17647fe04334f133c926d9931c55cb1";
- $Pair = "gmebtc";
- $Rate = "0.0001";
- $Nonce = time();
- // Post Request
- $Request = "https://api.altilly.com/api/order?key=" . $APIKey . '&secret=' . $APISecret . '&market=' . $Pair . '&quantity=' . $ran2 . '&rate=' . $Rate . '&nonce=' . $Nonce;
- $ch = curl_init($Request);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
- curl_setopt($ch, CURLOPT_POSTFIELDS, $Request);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array(
- 'Content-Type: application/json',
- 'version: 1.0.2',
- 'Authorization: code sadkj4-sadj-as22-asdk2',
- 'Content-Length: ' . strlen($Request))
- );
- // disable cert validation and settings
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // shouldn't need this
- $result = curl_exec($ch);
- // return response
- echo $result
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement