If you want to connect inside your box to the bitcoin client, then you have to use:
<?php
require_once 'jsonRPCClient.php';
$coin = new jsonRPCClient('rpcuser:rpcpw123@localhost:8332/');
$json =$coin->getnewaddress();
var_dump($json);
echo "</pre>";
?>
i.e: rpchost = localhost and rpcport = 8332 (default port for bitcoin). For a different altcoin, use the provided documentation.
You previously have to enable the rpcserver with these options in your conf file.
listen=1
server=1
daemon=1
rpcuser=rpcuser
rpcpassword=rpcpw123
rpcport=8332
rpcallowip=127.0.0.1