Search content
Sort by

Showing 20 of 177 results by The_Trader
Post
Topic
Board Project Development
Re: Cant pull RPC credentials from my config.php file
by
The_Trader
on 07/04/2023, 13:26:12 UTC
I'm not that familiar with PHP so I could be wrong, but it looks like you're passing strings instead of variables here?:

Code:
$bitcoin = new Bitcoin('$rpc_user','$rpc_pass','$rpc_host','$rpc_port');

Instead, it should be like this:

Code:
$bitcoin = new Bitcoin($rpc_user,$rpc_pass,$rpc_host,$rpc_port);

Ha thank you OmegaStarScream

That was exactly what it was, I have been sat here for hours staring at it and trying to figure out what is wrong, I knew it would be simple i was just too pissed off to see it.

Again thanks fr the prompt help it was appreciated Smiley

TT
Post
Topic
Board Project Development
Merits 6 from 1 user
Topic OP
Cant pull RPC credentials from my config.php file
by
The_Trader
on 07/04/2023, 13:07:37 UTC
⭐ Merited by hugeblack (6)
Hi all

So I want to display several things on a webpage in php ie getbalance, getblockheight etc etc

This was fine and everything was displaying as I wanted it too, but I found I was typing a lot of the same stuff so thought I would create a config to pull the info in from, however I am having issues as it wont connect to the wallet now.

My config:

Code:
<?php

$rpc_user 
'xxxxxxxxx';
$rpc_pass 'xxxxxxxxxxxxxxxxxxxxxx';
$rpc_host 'localhost';
$rpc_port 'xxxxx';

?>


My webpage:

Code:
<?php
include('config.php')
require_once(
'easybitcoin.php');

$bitcoin = new Bitcoin('$rpc_user','$rpc_pass','$rpc_host','$rpc_port');

$getbalance $bitcoin->getbalance();

print_r($getbalance);

?>

The above is a snipet of the webpage but if I can solve this bit then I can solve the rest, the config file is in the correct directory (the same as the index page)
I know the easybitcoin works because if i replace the $rpc_user etc with the actual details its is fine.

Any help would be most welcome, I suspect it is something real easy, that I can no longer see as im stressed out over it Smiley

Thanks
TT

Post
Topic
Board Project Development
Re: easybitcoin.php
by
The_Trader
on 28/10/2022, 22:18:16 UTC
Just do:

Code:
$getinfo['staking array']

Just like if you wanted to display the difficulty or moneysupply:

Code:
$getinfo['difficulty']
$getinfo['moneysupply']

Your page broke because @CounterEntropy's suggestion missed the quotes.

Wow as simple as that, some times you just cant see the wood from the tree's.

Many thanks for your help both of you Smiley

TT
Post
Topic
Board Project Development
Re: easybitcoin.php
by
The_Trader
on 28/10/2022, 22:06:43 UTC
Thanks for taking the time to help me its appreciated, this is the easybitcoin.php code:

https://github.com/aceat64/EasyBitcoin-PHP

I just cant figure it out Sad

Thanks
TT
Post
Topic
Board Project Development
Re: easybitcoin.php
by
The_Trader
on 28/10/2022, 21:47:48 UTC
Thanks for the reply, however that didnt work Sad

It broke the page "web address is currently unable to handle this request.

Thanks
TT
Post
Topic
Board Project Development
Merits 8 from 4 users
Topic OP
easybitcoin.php
by
The_Trader
on 28/10/2022, 20:45:01 UTC
⭐ Merited by BlackHatCoiner (4) ,dgoon (2) ,TryNinja (1) ,r_victory (1)
A nice little handy opensource bit of code........

This seems to work good on calling one response items such as getconnectioncount where just one figure is needed, but I am trying to display on my website single bits of information.

So I am stuck here

Code:
require_once('easybitcoin.php');

$bitcoin = new Bitcoin('user','pass','localhost','port');

$getinfo = $bitcoin->getinfo();

print_r($getinfo);

This of coarse returns something similar to this:

Code:
Array ( [version] => 1040203 [protocolversion] => 70929 [services] => NETWORK/BLOOM/ [walletversion] => 169900 [balance] => 6000.96068 [zerocoinbalance] => 0 [staking status] => Staking Active [blocks] => 1823565 [timeoffset] => 0 [connections] => 242 [proxy] => [difficulty] => 114235.22515094 [testnet] => [moneysupply] => 1114119657.5589 [keypoololdest] => 1666243740 [keypoolsize] => 99 [paytxfee] => 0 [relayfee] => 0.0001 [errors] => )

So my question is what would I alter here to get "staking status" for example:

Code:
$getinfo = $bitcoin->getinfo();

I have tried allsorts such as:

Code:
$getinfo = $bitcoin->getinfo(stakingstatus);
$getinfo = $bitcoin->getinfo->stakingstatus();
$getinfo = $bitcoin->getinfo=>stakingstatus();

But to no avail, so if anyone could point me int the correct direction I woud be very grateful

Thanks
TT
Post
Topic
Board Services
Topic OP
WANTED - Website Developer Required
by
The_Trader
on 14/09/2022, 10:59:01 UTC
I need a web developer for several projects.

Must have experience in HTML, PHP and the ability to pull in information via API from several sources.

A solid grasp of the masternode world is a must as that is where I frequent and all the projects originate from.

Thanks
TT
Post
Topic
Board Altcoin Discussion
Re: New Coin TUTELA
by
The_Trader
on 30/05/2022, 09:15:01 UTC
I can confirm I have tested the beta usecase and it works as it should and destroys its self on shut down Wink

A very interesting project that I have bought into.

Thanks
TT
Post
Topic
Board Altcoin Discussion
Re: Any API guru's here ?
by
The_Trader
on 17/04/2022, 21:26:40 UTC
I don't know about PHP.

But does the nested array only has 3 items. If that is so, maybe you can directly access the index. Or if it is not, reiterate the array to print the value based on the ID.

Anyway, you should have posted this question on Stackoverflow.

I did post it their and it got hidden, telling me it was lacking research which is nonsense as I have been trying to solve this all day

Its the attaching the id number im having issues with I have tried all sorts like
Code:
print_r($obj->result->deposits->deposit_id->38->total_earned);
but it wont work Sad
Post
Topic
Board Project Development
Topic OP
API help needed - Easy answer for some of you I guess, But not for me :(
by
The_Trader
on 17/04/2022, 20:15:30 UTC
I know this dosn't really belong here as it isn't specifically BTC but I shall be using the same for my BTC api calls, and you have been kind and helped me before.

This is an official IHost example and the address given are fictitious

Real quick one so I am trying to get a specific bit of information from an API.

It's an IHost api I am calling and i get a response similar to this:

Code:
{
    "result": {
        "deposits": [
            {
                "deposit_id": 36,
                "share_id": 2,
                "current_amount": 53.077553,
                "total_deposited": 24.91567,
                "total_earned": 28.146885,
                "withdraw_address": "GcUgnY5fFwTv9ef8rsggdxbdQzLEUxpp4c",
                "deposit_address": "GfUgnY5sFwTf9ez8rovtdxdEQzLcbxpb4c"
            },
            {
                "deposit_id": 37,
                "share_id": 5,
                "current_amount": 885.9591,
                "total_deposited": 521.92,
                "total_earned": 472.30566,
                "withdraw_address": "gHWHPs21H8UsSNcbfWxvn5XssAxFkcuZYe",
                "deposit_address": "g4sbWWtD3tf16Dsd8wiaJkar3zhJ82qNKP"
            },
            {
                "deposit_id": 38,
                "share_id": 6,
                "current_amount": 754.5115,
                "total_deposited": 548.52997,
                "total_earned": 416.25214,
                "withdraw_address": "LLqWFFJkNSog6VwsbPWEWE4KcXJrzB6t1K",
                "deposit_address": "LW5Vbt1gEkvVQzfVcpLmidLPpcED1Yp3yu"
            }
        ]
    },
    "error": ""
}

by using

Code:
print_r($obj->result->deposits);

BUT how do I just get a specific bit of info for example if I want to display total_earned on deposit ID38 what would I have to alter

Code:
print_r($obj->result->deposits);

to to make it work ?

Many Thanks for any help offered Smiley

TT
Post
Topic
Board Altcoin Discussion
Topic OP
Any API guru's here ?
by
The_Trader
on 17/04/2022, 19:48:14 UTC
Real quick one so I am trying to get a specific bit of information from an API.

It's an IHost api I am calling and i get a response similar to this:

Code:
{
    "result": {
        "deposits": [
            {
                "deposit_id": 36,
                "share_id": 2,
                "current_amount": 53.077553,
                "total_deposited": 24.91567,
                "total_earned": 28.146885,
                "withdraw_address": "GcUgnY5fFwTv9ef8rsggdxbdQzLEUxpp4c",
                "deposit_address": "GfUgnY5sFwTf9ez8rovtdxdEQzLcbxpb4c"
            },
            {
                "deposit_id": 37,
                "share_id": 5,
                "current_amount": 885.9591,
                "total_deposited": 521.92,
                "total_earned": 472.30566,
                "withdraw_address": "gHWHPs21H8UsSNcbfWxvn5XssAxFkcuZYe",
                "deposit_address": "g4sbWWtD3tf16Dsd8wiaJkar3zhJ82qNKP"
            },
            {
                "deposit_id": 38,
                "share_id": 6,
                "current_amount": 754.5115,
                "total_deposited": 548.52997,
                "total_earned": 416.25214,
                "withdraw_address": "LLqWFFJkNSog6VwsbPWEWE4KcXJrzB6t1K",
                "deposit_address": "LW5Vbt1gEkvVQzfVcpLmidLPpcED1Yp3yu"
            }
        ]
    },
    "error": ""
}

By using
Code:
print_r($obj->result->deposits);

BUT how do I just get a specific bit of info for example if I want to display total_earned on deposit ID38 what would I have to alter
Code:
print_r($obj->result->deposits);
to to make it work ?

Many Thanks for any help offered Smiley

TT
Post
Topic
Board Project Development
Re: My code is wrong and I cant figure it out :-\
by
The_Trader
on 07/03/2022, 21:16:26 UTC
I would try this:
Code:
  require_once 'jsonRPCClient.php';
 
  $bitcoin = new jsonRPCClient('http://xxxxxxxx:xxxxxxxxxxxxxxxxxxxxxx@176.31.183.107:27772/');
  echo print_r($bitcoin);
  echo "<pre>\n";
  echo print_r($bitcoin->getbalance());
  echo "</pre>";

than look at the source of the page rendered.

print_r itself represent a string. You must echo it to print it.

If it appears that "bitcoin" is NULL or some error object, it may not be connecting. The info there you would get there may give you some insight.

You may also consider looking into:
Code:
ini_set('display_errors', 1);
error_reporting(E_ALL);

It's throwing an error I have never seem before:

Code:
[07-Mar-2022 21:11:03 UTC] PHP Fatal error:  Uncaught Exception: Incorrect response id (request id: 1646687463, response id: )
Post
Topic
Board Project Development
Merits 2 from 1 user
Topic OP
My code is wrong and I cant figure it out :-\
by
The_Trader
on 07/03/2022, 16:18:50 UTC
⭐ Merited by Husires (2)
I know this is the BTC section but their is not similar for altcoin and as everything is derived from BTC I presume the answer would be the same so here I am  Grin

I am trying to display information from my vps wallet onto my php webpage, I have spent 2 days googling but to no avail, perhaps some one here could laugh at my code and correct it - or - suggest a better way to achieve what I am looking for.


   
Code:
  require_once 'jsonRPCClient.php';
 
  $bitcoin = new jsonRPCClient('http://xxxxxxxx:xxxxxxxxxxxxxxxxxxxxxx@176.31.183.107:27772/');
   
  echo "<pre>\n";
  print_r($bitcoin->getbalance());
  echo "</pre>";



Many thanks
Post
Topic
Board Announcements (Altcoins)
Re: AllSafe SAFE
by
The_Trader
on 27/02/2022, 07:22:42 UTC
I presume this is either dead or dying now ?
Price over the last 12 months has steadily declined and I see no real news coming from the dev team.

Please correct me if I am wrong.

Thinking it maybe time for me to get out of this one now

TT
Post
Topic
Board Services
Re: Mining Pool Setup Services, Mine with GPUs/ASIC & Compatible with NiceHash
by
The_Trader
on 25/02/2022, 18:05:32 UTC
Please check discord.
Thanks
TT
Post
Topic
Board Services
Re: contracts token and coin development
by
The_Trader
on 06/02/2022, 11:09:36 UTC
Wow

I understand that your work will be varied and therefore costings will also differ but i all honesty how do you expect to get any leads from a post that simply says
Quote
tg: @alexneud

I am looking for some coin development but again to be honest you are not the guy for me, you are trying to sell a service and I as a customer would expect you to put in the work it deserves, and my thinking is that if you can't be bothered to do a decent topic then you probably wont be bothered to do a decent job for me.

I could of coarse be completely wrong and you could be the dogs bollo*ks at this but you have failed to sell yourself to me.

^ is some friendly criticism and please take it that way. Adjust your topic and make it look nice with images and some sort of pricing guide and the customers will surly come.

Thanks
TT

Post
Topic
Board Service Discussion
Topic OP
Looking for a Stake Pool script- Cant find one anywhere :-\
by
The_Trader
on 06/02/2022, 10:31:53 UTC
So as per the title I am looking for a website php script that runs a POS pool as opposed to the standard POW pools, something similar to stakecube I guess but with out all the other stuff they offer ie: exchange,fauctes and god knows what else.

I am really surprised this is so hard to find out there on the big WWW it seems everyone is still playing around with mpos, yimmp etc

Anyway if any one can point me in the right direction it would be most appreciated, oh and a while I have you here reading this I am also looking for masternodes scripts, I have a few MN's myself and am thinking of setting up a hosted service for either full MN's or shared MN's but again everything I have looked at so far have not really been fit for purpose, and these types of scripts seem to be pretty thin o the ground.

Thanks for any advice and the time taken to reply to this!

MM
Post
Topic
Board Altcoin Discussion
Re: Altcoin address widget - is their one ?
by
The_Trader
on 30/01/2022, 20:32:46 UTC

It should be fairly easy if you know basic HTML and javascript:

Code:
let api_url = "https://chainz.cryptoid.info/xp/api.dws?q=getbalance&a=PCN5rFx9ZL3rDMpPAP8KKo5jB3hBbYxC7F"

async function getapi(url) {
    const response = await fetch(url);
    
    var data = await response.json();
    document.getElementById("data").innerHTML = data; // or some code to put up the data on the html
}
getapi(api_url);

If you still got trouble getting it displayed on your page, simply searching for "displaying API data on HTML" should be good to go.

I know a bot which is prob dangerous Smiley

I understand about pulling specific info from arrays like this :
https://bittrex.com/api/v1.1/public/getticker/?market=btc-eth

Using something like this :

Code:
$obj = json_decode($result);

/*
echo"<pre>";
print_r($obj);
echo"</pre>";
*/

echo $obj->result->Bid;

But I have no obj to display/print as it is just the balance i am after

Thanks
TT
Post
Topic
Board Altcoin Discussion
Re: Altcoin address widget - is their one ?
by
The_Trader
on 30/01/2022, 19:49:18 UTC
I am looking for either a widget that can take info from an altcoin address.... Example it will show balance of a specific address on my website (html/php).
I don't mind either a pre made widget or raw code.

Thanks
TT

It would be helpful if you could specify for which altcoin need information on your website. I doubt there is a universal solution.
Also, if you have programming skills in PHP or some other language, you can access APIs from different blockchain explorers, for example, check out the Etherscan documentation here.



I am trying to set up a webpage to monitor my masternodes balances but I am having trouble (usual story)

Any idea how I would display this api result on my page ?

https://chainz.cryptoid.info/xp/api.dws?q=getbalance&a=PCN5rFx9ZL3rDMpPAP8KKo5jB3hBbYxC7F

And thanks for your replies Smiley

TT
Post
Topic
Board Services
Re: Mining Pool Setup Services, Mine with GPUs/ASIC & Compatible with NiceHash
by
The_Trader
on 29/01/2022, 12:27:31 UTC
Service Review

I contacted this guy via discord, did a deal for what I wanted, I gave him sudo access to one of my servers, and he simply got on with it, I was expecting to have to pay first, but no he just completed the task I requested, gave me time to check and test. All was fine so I paid.

Quick Review : Does exactly what he says he does +1 from me.

Thanks
TT