DanBrill Posted October 5, 2004 Posted October 5, 2004 When a user submits a form I'd like to capture their IP address. I'm using: $webEvent=new FX($FMAddress, $FMPort); $webEvent -> setDBUserPass('User' , $FMPassword); $webEvent -> setDBData('CabiNet.fp7' , 'WebEvents'); $webEvent -> AddDBParam('UserEmail' , $userEmail); $webEvent -> AddDBParam('IP', getHostByName($REMOTE_ADDR)); $webEvent -> AddDBParam('EventDescription', 'Password sent to user'); $webEvent_OK = $webEvent -> FMNew(); I thought the php command getHostByName($REMOTE_ADDR) would do the trick, but this keeps giving me the IP of the machine that is serving the database. Any ideas? Thanks, Dan
Garry Claridge Posted October 5, 2004 Posted October 5, 2004 Try this one: $_SERVER['REMOTE_ADDR'] All the best. Garry
DanBrill Posted October 6, 2004 Author Posted October 6, 2004 Thanks, Garry. Looks like that's doing the trick. Dan
Recommended Posts
This topic is 7455 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now