Topic: Ip address of New users.
Lackatee
avatar
Pizzaman
Pizzaman
Posts: 48

Posted:
May 10, 2005

When a new user registers on my site, i have it set to send me an e-mail. But all the e-mail says is:

Code
  1. A new user has registered on the web site. User name: username
  2.  


I was wondering how i can have it show me the IP address that the user registered with, as well.

Got any ideas?
Chestnut
avatar
Site Admin
Posts: 1320

Posted:
May 11, 2005

mmm... maybe changing the lang define _NOTIFYEMAILCONT1 would be enough :
NewUser/lang/eng/global.php

Code
  1. define('_NOTIFYEMAILCONT1','A new user has registered on the web site. '.pnServerGetVar('REMOTE_ADDR').' - User name: ');
  2.  


Chestnut ! Cool
Site Admin
Lackatee
avatar
Pizzaman
Pizzaman
Posts: 48

Posted:
May 12, 2005

You Da man! It works perfectly. When i can, ill donate you something for all your time and help. Its appreciated. :)
Lackatee
avatar
Pizzaman
Pizzaman
Posts: 48

Posted:
May 12, 2005

Hey, where can i get a list of these ServerGetvar's? Or any getvars .. trying to learn..
Chestnut
avatar
Site Admin
Posts: 1320

Posted:
May 12, 2005

If you do a phpinfo on your site

Example phpinfo.php

Code
  1. <?php
  2. phpinfo&#40;);
  3. <?


the pnSerVerGetVar('xxx') will show you most of the values of the APACHE ENVIRONMENT setcion and the PHP VARIABLES sections.

:wink:

Chestnut ! Cool
Site Admin
Lackatee
avatar
Pizzaman
Pizzaman
Posts: 48

Posted:
May 12, 2005

Yeah, i figured that out after i posted this. Just forgot to post about it. Thanks though. :)
Lackatee
avatar
Pizzaman
Pizzaman
Posts: 48

Posted:
May 12, 2005

So if i wanted to add th auth user name is would be
Code
  1. '.pnRequestGetVar('authusername').'
... Th reason i ask it doesn't say _SERVER in front of it. Its _REQUEST. So I'm assuming it isn't a "Server" Var .. or is it still? Its listed under the Variables.

Thanks :)
Chestnut
avatar
Site Admin
Posts: 1320

Posted:
May 13, 2005

mmm nope... don't think so... along with the fact that there is no pnRequestGetVar function...

Only the $_SERVER vars will be returned.

The pnVarCleanFromInput might give it to you if it is a script that saved the value in the $_REQUEST part of the superglobals.

Code
  1. $x = pnVarCleanFromInput&#40;'x');
  2.  


Chestnut ! Cool
Site Admin