Bitcoin Forum
April 19, 2024, 11:20:18 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 3 4 5 6 7 8 9
1  Bitcoin / Project Development / Re: Cant pull RPC credentials from my config.php file on: April 07, 2023, 01:26:12 PM
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 for the prompt help it was appreciated Smiley

TT
2  Bitcoin / Project Development / Cant pull RPC credentials from my config.php file on: April 07, 2023, 01:07:37 PM
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

3  Bitcoin / Project Development / Re: easybitcoin.php on: October 28, 2022, 10:18:16 PM
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
4  Bitcoin / Project Development / Re: easybitcoin.php on: October 28, 2022, 10:06:43 PM
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
5  Bitcoin / Project Development / Re: easybitcoin.php on: October 28, 2022, 09:47:48 PM
Thanks for the reply, however that didnt work Sad

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

Thanks
TT
6  Bitcoin / Project Development / easybitcoin.php on: October 28, 2022, 08:45:01 PM
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
7  Economy / Services / WANTED - Website Developer Required on: September 14, 2022, 10:59:01 AM
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
8  Alternate cryptocurrencies / Altcoin Discussion / Re: New Coin TUTELA on: May 30, 2022, 09:15:01 AM
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
9  Alternate cryptocurrencies / Altcoin Discussion / Re: Any API guru's here ? on: April 17, 2022, 09:26:40 PM
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
10  Bitcoin / Project Development / API help needed - Easy answer for some of you I guess, But not for me :( on: April 17, 2022, 08:15:30 PM
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
11  Alternate cryptocurrencies / Altcoin Discussion / Any API guru's here ? on: April 17, 2022, 07:48:14 PM
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
12  Bitcoin / Project Development / Re: My code is wrong and I cant figure it out :-\ on: March 07, 2022, 09:16:26 PM
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: )
13  Bitcoin / Project Development / My code is wrong and I cant figure it out :-\ on: March 07, 2022, 04:18:50 PM


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>";


The result of the above is a white page, and on view source it displays

Code:
<pre>

Many thanks
14  Alternate cryptocurrencies / Announcements (Altcoins) / Re: AllSafe SAFE on: February 27, 2022, 07:22:42 AM
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
15  Economy / Services / Re: Mining Pool Setup Services, Mine with GPUs/ASIC & Compatible with NiceHash on: February 25, 2022, 06:05:32 PM
Please check discord.
Thanks
TT
16  Economy / Services / Re: contracts token and coin development on: February 06, 2022, 11:09:36 AM
Wow

I understand that your work will be varied and therefore costings will also differ but in 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

17  Economy / Service Discussion / Looking for a Stake Pool script- Cant find one anywhere :-\ on: February 06, 2022, 10:31:53 AM
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 on the ground.

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

TT
18  Alternate cryptocurrencies / Altcoin Discussion / Re: Altcoin address widget - is their one ? on: January 30, 2022, 08:32:46 PM

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 bit 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
19  Alternate cryptocurrencies / Altcoin Discussion / Re: Altcoin address widget - is their one ? on: January 30, 2022, 07:49:18 PM
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
20  Economy / Services / Re: Mining Pool Setup Services, Mine with GPUs/ASIC & Compatible with NiceHash on: January 29, 2022, 12:27:31 PM
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
Pages: [1] 2 3 4 5 6 7 8 9
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!