Re: [PHP] Getting ip address of client and displaying a number in decimal format.

2001-09-13 Thread Alexander Skwar
So sprach »Troy Lynch« am 2001-09-13 um 17:48:55 -0500 : > I'm trying to find out how to do 2 things one. I'd like to get the ip > address of the client machine so I can write it to a database. And then I'd -> php.net/ip2long > like to convert a number to show 2 decmials to the right like for mo

RE: [PHP] Getting ip address of client and displaying a number in decimal format.

2001-09-13 Thread Kelly Barrett
Troy, $REMOTE_ADDR gives you the client IP. To convert a number to show 2 decimals use "sprintf": $money = 5; $money_string = sprintf("%.2f", $money); // $money_string will be 5.00 Cheers, Kelly. > -Original Message- > From: Troy Lynch [mailto:[EMAIL PROTECTED]] > Sent: Friday, 14 Sep