Harry Wheat
|
| Posted: 01/14/2003, 6:30 PM |
|
How do I track an IP # of a user whenever the user logs in. I would like to
track time and date and ip #.
Thanks
Harry
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 01/15/2003, 8:40 AM |
|
You may use Requst.ServerVariables("REMOTE_ADDR") to get user ip
--
Alex,
Support Engineer
CodeCharge Team
"Harry Wheat" <sales@ifixpcs.com> wrote in message
news:b02h3k$6io$1@news.codecharge.com...
> How do I track an IP # of a user whenever the user logs in. I would like
to
> track time and date and ip #.
> Thanks
> Harry
>
>
|
|
|
 |
Jim Crews
|
| Posted: 01/15/2003, 11:09 AM |
|
What will do the same in php/
Thanks,
Jim
"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:b042tg$4de$2@news.codecharge.com...
> You may use Requst.ServerVariables("REMOTE_ADDR") to get user ip
>
> --
>
> Alex,
> Support Engineer
> CodeCharge Team
>
>
> "Harry Wheat" <sales@ifixpcs.com> wrote in message
>news:b02h3k$6io$1@news.codecharge.com...
> > How do I track an IP # of a user whenever the user logs in. I would like
> to
> > track time and date and ip #.
> > Thanks
> > Harry
> >
> >
>
>
|
|
|
 |
Jim Crews
|
| Posted: 01/15/2003, 7:36 PM |
|
Figured it out
global $kincc_gbk;
function GetIPAddress()
{
global $HTTP_SERVER_VARS;
return $HTTP_SERVER_VARS['REMOTE_ADDR'];
}
$kincc_gbk->gbk_ip->SetValue(GetIPAddress());
Jim
"Jim Crews" <jcrews@umcsc.org> wrote in message
news:b04bki$l2l$1@news.codecharge.com...
> What will do the same in php/
> Thanks,
> Jim
>
> "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
>news:b042tg$4de$2@news.codecharge.com...
> > You may use Requst.ServerVariables("REMOTE_ADDR") to get user ip
> >
> > --
> >
> > Alex,
> > Support Engineer
> > CodeCharge Team
> >
> >
> > "Harry Wheat" <sales@ifixpcs.com> wrote in message
> >news:b02h3k$6io$1@news.codecharge.com...
> > > How do I track an IP # of a user whenever the user logs in. I would
like
> > to
> > > track time and date and ip #.
> > > Thanks
> > > Harry
> > >
> > >
> >
> >
>
>
|
|
|
 |
Kevin
|
| Posted: 01/19/2003, 2:39 AM |
|
I just tried to add the code to a Before Show event on the field ip_add in
the grid users and nothing... the field ip_add is from a database, hidden on
the grid;
<?php
//BindEvents Method @1-02ED027A
function BindEvents()
{
global $users;
$users->ip_add->CCSEvents["BeforeShow"] = "users_ip_add_BeforeShow";
}
//End BindEvents Method
function users_ip_add_BeforeShow() { //users_ip_add_BeforeShow @19-D34D75A8
//Custom Code @21-2A29BDB7
// ------------------------- This is the only code that was added to the
event -----
global $HTTP_SERVER_VARS;
return $HTTP_SERVER_VARS['REMOTE_ADDR'];
// -------------------------
//End Custom Code
} //Close users_ip_add_BeforeShow @19-FCB6E20C
?>
-------------- Why are not some ot the common things we have to do in the
toolbox?
Thanks
"Harry Wheat" <sales@ifixpcs.com> wrote in message
news:b02h3k$6io$1@news.codecharge.com...
> How do I track an IP # of a user whenever the user logs in. I would like
to
> track time and date and ip #.
> Thanks
> Harry
>
>
|
|
|
 |
Kevin
|
| Posted: 01/19/2003, 4:12 PM |
|
Taking into account _SERVER[] and HTTP_SERVER_VARS[]
The GRID was named TASK, the database field UPDATE_IP...
While the BEFORESHOW method works it means that every grid must have this
code if you are tracking who entered what and from where...
<?php
//BindEvents Method @1-0273B9B4
function BindEvents()
{
global $task;
$task->CCSEvents["BeforeShow"] = "task_BeforeShow";
}
//End BindEvents Method
function task_BeforeShow() { //task_BeforeShow @2-EF5747C6
//Custom Code @13-2A29BDB7
// -------------------------
global $task;
$server_var = $_SERVER["REMOTE_ADDR"];
$http_var = $HTTP_SERVER_VARS['REMOTE_ADDR'];
if ($server_var) {$ip_add = $server_var;}
elseif ($http_var) {$ip_add = $http_var;}
else {$ip_add = "Invaild IP Address";}
$task->update_ip->setvalue($ip_add);
// -------------------------
//End Custom Code
} //Close task_BeforeShow @2-FCB6E20C
?>
"Harry Wheat" <sales@ifixpcs.com> wrote in message
news:b02h3k$6io$1@news.codecharge.com...
> How do I track an IP # of a user whenever the user logs in. I would like
to
> track time and date and ip #.
> Thanks
> Harry
>
>
|
|
|
 |
Raxip
|
| Posted: 01/19/2003, 5:58 PM |
|
Can someone explain what this line did?
$kincc_gbk->gbk_ip->SetValue(GetIPAddress());
"Jim Crews" <jcrews@umcsc.org> wrote in message
news:b059c1$dn2$1@news.codecharge.com...
> Figured it out
>
> global $kincc_gbk;
> function GetIPAddress()
> {
> global $HTTP_SERVER_VARS;
> return $HTTP_SERVER_VARS['REMOTE_ADDR'];
> }
> $kincc_gbk->gbk_ip->SetValue(GetIPAddress());
> Jim
>
> "Jim Crews" <jcrews@umcsc.org> wrote in message
>news:b04bki$l2l$1@news.codecharge.com...
> > What will do the same in php/
> > Thanks,
> > Jim
> >
> > "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
> >news:b042tg$4de$2@news.codecharge.com...
> > > You may use Requst.ServerVariables("REMOTE_ADDR") to get user ip
> > >
> > > --
> > >
> > > Alex,
> > > Support Engineer
> > > CodeCharge Team
> > >
> > >
> > > "Harry Wheat" <sales@ifixpcs.com> wrote in message
> > >news:b02h3k$6io$1@news.codecharge.com...
> > > > How do I track an IP # of a user whenever the user logs in. I would
> like
> > > to
> > > > track time and date and ip #.
> > > > Thanks
> > > > Harry
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
 |