Author

Topic: Troubles with jsonRPCClient (Read 1408 times)

legendary
Activity: 2912
Merit: 1060
December 24, 2013, 03:38:27 AM
#5
You have a problem in the include
member
Activity: 70
Merit: 10
December 17, 2013, 10:07:44 AM
#4
This is index.php file.

Code:
require_once 'jsonRPCClient.php';

$dogecoin = new jsonRPCClient('nick:password@domain:22555');
try{
  echo 
"
\n";
  
print_r($dogecoin->getinfo());
  echo 
"
"
;
} catch(
Exception $e){
  echo 
nl2br($e->getMessage()).''."\n"; }
?>

what domain your using? and about port 22555? have you changed it in bitcoin daemon to match it?
newbie
Activity: 9
Merit: 0
December 16, 2013, 02:09:26 PM
#3
This is index.php file.

Code:
require_once 'jsonRPCClient.php';

$dogecoin = new jsonRPCClient('nick:password@domain:22555');
try{
  echo 
"
\n";
  
print_r($dogecoin->getinfo());
  echo 
"
"
;
} catch(
Exception $e){
  echo 
nl2br($e->getMessage()).''."\n"; }
?>
member
Activity: 84
Merit: 10
December 16, 2013, 12:46:32 PM
#2
Can you show the index.php code? Or this is index?

Code:
require_once 'jsonRPCClient.php';

&
#38;#38;#12288;$dogecoin = new jsonRPCClient('nick:password@domain:22555');
try{
&
#38;#38;#12288;echo "
\n";
 print_r($dogecoin->getinfo());
 echo "
";
} catch(Exception $e){
&
#38;#38;#12288;echo nl2br($e->getMessage()).''."\n"; }
?>
newbie
Activity: 9
Merit: 0
December 16, 2013, 06:31:37 AM
#1
Have some1 the same problem:

Code:
Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://nick:password@domain:22555/' in /var/www/jsonRPCClient.php:139
Stack trace:
#0 /var/www/index.php(7): jsonRPCClient->__call('getinfo', Array)
#1 /var/www/index.php(7): jsonRPCClient->getinfo()
#2 {main}
thrown in /var/www/jsonRPCClient.php on line 139

I've this code
Code:
require_once 'jsonRPCClient.php';

&
#38;#12288;$dogecoin = new jsonRPCClient('nick:password@domain:22555');
try{
&
#38;#12288;echo "
\n";
 print_r($dogecoin->getinfo());
 echo "
";
} catch(Exception $e){
&
#38;#12288;echo nl2br($e->getMessage()).''."\n"; }
?>


With Exception I've got this error

Code:
Parse error: syntax error, unexpected '$dogecoin' (T_VARIABLE) in /var/www/index.php on line 9
Jump to: