PDA

View Full Version : Reference IP during registration process


JPnyc
08-29-2008, 02:22 PM
I'm not sure if this should be in the programming discussions section or not, but here it is anyway. I'm doing some testing during the registration process, before the account is actually created.

I already have some plug-ins written hooked on register_add_member_process. I'm successfully referencing certain fields in this matter now:

$vbulletin->GPC['email'];

and what I want to know is, how do I reference IP address in the same fashion? Would it be something like this? :

$vbulletin->GPC['ipaddress'];

Thanks much for any help. :)

Opserty
08-29-2008, 08:40 PM
vBulletin creates a PHP constant to contain it.

IPADDRESS
:D

JPnyc
08-29-2008, 08:58 PM
So I can just reference $IPADDRESS? Or minus the $? Without the object reference? Thanks!

Opserty
08-29-2008, 09:54 PM
You just use it on your own. I recommend you do a bit of background reading first: http://php.net/constants :)

JPnyc
08-30-2008, 02:46 PM
Thanks, I think I got it now. PHP isn't one of my languages, obviously. Mille grazie, as my people say ;)

JPnyc
09-02-2008, 03:06 PM
Huge thanks for this, I got what I needed to do, working. :)

Opserty
09-02-2008, 06:54 PM
No problem. :)