Bitcoin Forum

Economy => Services => Topic started by: MicroGuy on March 02, 2018, 02:22:50 AM



Title: .
Post by: MicroGuy on March 02, 2018, 02:22:50 AM
.


Title: Re: Make Fast .005 BTC for Debugging PHP/Curl Script
Post by: SlavicSquats on March 02, 2018, 04:10:53 AM
Well for starters,
 echo $sRequest; is a de-bug request, not sure what your going for fully here since you use Hungarian Notion.

Then $execResult = curl_exec($ch); is right out of the PHP Docs so you may wanna fit that to what your looking for more.

That should get you ahead a decent amount!

BTC - 3Bt5TVKGGdJqUFSBrLf5WyckavmPRUc5hT

EDIT - I guess I wont get my BTC :(


Title: Re: Make Fast .005 BTC for Debugging PHP/Curl Script
Post by: MMM005 on March 02, 2018, 12:02:58 PM
Try this code:

Code:
<?php

ini_set
('display_errors''On');
error_reporting(E_ALL);

// Generate random amount between 28.00 and 30.00
$ran1 mt_rand(28003000);
$ran2 $ran1/100;

// Config
$sAPIKey ""// private key
$sAPISecret ""// api secret

$sPair "GLD_BTC";
$sRate "0.0001";
$sNonce time();
$sRequest "https://www.tradesatoshi.com/api/private/submitorder";

$ch curl_init();
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);

// disable cert validation
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($chCURLOPT_SSL_VERIFYHOSTfalse);


$rParam = array('Market' => $sPair'Type' => 'Buy''Amount' => $ran2'Price' => $sRate);
$rParam json_encode($rParam);
$rSignature $sAPIKey 'POST' strtolower(urlencode($sRequest)) . $sNonce base64_encode($rParam);
$hmac_sign base64_encode(hash_hmac('sha512'$rSignaturebase64_decode($sAPISecret), true));
$header 'Basic ' $sAPIKey ':' $hmac_sign ':' $sNonce;
$headers = array("Content-Type: application/json; charset=utf-8""Authorization: $header");
curl_setopt($chCURLOPT_HTTPHEADER$headers);
curl_setopt($chCURLOPT_URL$sRequest);
curl_setopt($chCURLOPT_POSTFIELDS$rParam);
// run the query
$execResult curl_exec($ch);

var_dump($execResult);


BTC AddressBTC: 1EjmkQq7pHsmKhhrpP3hcGehq3ryAF3Qrb