PHP Api
-
[quote name=“DeadZebra” post=“4148” timestamp=“1368794276”]
Hey guys I’m working with a BTC PHP API and I’m trying to convert it to a FTC API which I think would be great. Anyway I’m a bit lost because this is the first time I’m trying to touch the BTC client with code. I need to figure out how to get the following details to connect to my FTC client.$btcclient[“host”] = “127.0.0.1”;
$btcclient[“user”] = “username”;
$btcclient[“pass”] = “password”;
$btcclient[“port”] = “4367”;Anyone know where I can find this information?
[/quote]Those are the RPC user, password and port for your feathercoind.
-
For working with feathercoind try this:
Basic [b]index.php[/b] (modify/add-to as needed):
[code]
require_once ‘jsonRPCClient.php’;$ftc = new jsonRPCClient(‘http://USER:[email protected]:4367/’);
print_r($ftc->getinfo()); echo “\n”;
?>[/code]
[b]jsonRPCClient.php[/b]
[code]/*
COPYRIGHTCopyright 2007 Sergio Vaccaro
-
Thanks! I’m just not sure where the config info to connect to the client :-\ like the IP/username/password etc?
-
[quote name=“DeadZebra” post=“4429” timestamp=“1368986990”]
Thanks! I’m just not sure where the config info to connect to the client :-\ like the IP/username/password etc?
[/quote]Although I have not looked in a Linux sys for the feathercoin location, if it is like litecoin then it will be located @
[code]~/.feathercoin/feathercoin.conf[/code]On Windows:
[code]%APPDATA%/Feathercoin/feathercoin.conf[/code]And setup like so:
[code]server=1
rpcallowip=127.0.0.1
rpcuser=username - not an obvious one
rpcpassword=|$trOng|P4ssW0rd|H3rE|[/code]The above was a litecoin.conf so [i]may[/i] differ for feathercoin slightly? Although rpcuser & rpcpassword are definitely the same…
-
[quote name=“UKMark” post=“4448” timestamp=“1369001691”]
[quote author=DeadZebra link=topic=557.msg4429#msg4429 date=1368986990]
Thanks! I’m just not sure where the config info to connect to the client :-\ like the IP/username/password etc?
[/quote]Although I have not looked in a Linux sys for the feathercoin location, if it is like litecoin then it will be located @
[code]~/.feathercoin/feathercoin.conf[/code]On Windows:
[code]%APPDATA%/Feathercoin/feathercoin.conf[/code]And setup like so:
[code]server=1
rpcallowip=127.0.0.1
rpcuser=username - not an obvious one
rpcpassword=|$trOng|P4ssW0rd|H3rE|[/code]The above was a litecoin.conf so [i]may[/i] differ for feathercoin slightly? Although rpcuser & rpcpassword are definitely the same…
[/quote]Awesome thanks man and port?
-
AFAIK the default [i]RPC [/i]port for Feathercoin is 9337…
-
I’m working on a small PHP library that does pretty much all that Feathercoin can do and is properly documented on top. I’ll post as soon as it’s ready for public consumption.
-
[quote name=“UKMark” post=“4582” timestamp=“1369085443”]
AFAIK the default [i]RPC [/i]port for Feathercoin is 9337…
[/quote]Thanks man appreciate it :)
-
[quote name=“ChristianRiesen” post=“4589” timestamp=“1369086611”]
I’m working on a small PHP library that does pretty much all that Feathercoin can do and is properly documented on top. I’ll post as soon as it’s ready for public consumption.
[/quote]Awesome man please keep me updated ;)
-
[quote name=“DeadZebra” post=“4827” timestamp=“1369116997”]
[quote author=ChristianRiesen link=topic=557.msg4589#msg4589 date=1369086611]
I’m working on a small PHP library that does pretty much all that Feathercoin can do and is properly documented on top. I’ll post as soon as it’s ready for public consumption.
[/quote]Awesome man please keep me updated ;)
[/quote]+1 Please do Christian! 8)