vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Reference IP during registration process (https://vborg.vbsupport.ru/showthread.php?t=189471)

JPnyc 08-29-2008 02:22 PM

Reference IP during registration process
 
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.
PHP Code:

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. :)


All times are GMT. The time now is 06:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00918 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete