Gossamer Forum
Home : Products : Links 2.0 : Customization :

Adding Ip address to Registration Process

Quote Reply
Adding Ip address to Registration Process
Hello, please forgive me if this has been posted before, but after spending some time looking I cannot find out how to recieve the ip address of the person who is trying to register with my links site. I would like to recieve the ip address along with all the other information provided in the form. Can someone steer me in the right direction? Wink
Nootkan
Quote Reply
Re: [nootkan] Adding Ip address to Registration Process In reply to
Is this Links 2 (static files), or Gossamer Links?

I'm not aware of "Links 2" having a use signup script :/

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Adding Ip address to Registration Process In reply to
Heres the header in my add.cgi file.

Links
# -------------
# Links Manager
#
# File: add.cgi
# Description: Adds a record marked unvalidated to the database and
# optionally emails someone.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.01

I notice that I have the ip address collected in my script but for some reason it isn't being sent to the admin.
Update: I figured it out. For some reason I wasn't recieving my admin emails. I am now and the ip address is there again. Thanks for replying to my post.
Nootkan

Last edited by:

nootkan: Jan 15, 2009, 10:47 PM
Quote Reply
Re: [nootkan] Adding Ip address to Registration Process In reply to
Ok, so that does look like Links 2 - but what "registration process" are you talking about? Are you getting confused, add.cgi? (thats not a "registration" script, but an "adding" script Tongue)

I just had a quick look, and couldn't find any mods that log IP addresses in add.cgi. It can be done for sure, but I'm afraid its been a while since I worked on Links2, and don't have any free time to start trying to work out how things work again =)

Maybe PerlFlukie can help - as he's very good with Links2 Whistle

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Adding Ip address to Registration Process In reply to
Adding your link or registering your link, I consider both to mean the same thing. Sorry that is just my feeble mind managing everything according to me. I already have a line in add.cgi that collects the ip address ( I think perlflunkie provided it for me) In case anyone else wants to add it I've provided it below. My problem is resolved. I had just misconfigured my email address for admin. Thanks for taking the time to try and help me Andy, it is much appreciated.
Code:
# --------------------------------------------------------
# Sends an email to the admin, letting him know that there is
# a new link waiting to be validated. No error checking as we don't
# want users to see the informative &cgierr output.
# Check to make sure that there is an admin email address defined.
$db_admin_email or &cgierr("Admin Email Address Not Defined in config file!");
my $to = $db_admin_email;
my $from = $in{$db_cols[$db_contact_email]};
my $subject = "Addition to Database: $in{'Title'}\n";
my $msg = qq|
The following link is awaiting validation:
Title: $in{'Title'}
URL: $in{'URL'}
Category: $in{'Category'}
Description: $in{'Description'}
Contact Name: $in{'Contact Name'}
Contact Email: $in{'Contact Email'}

Remote Host: $ENV{'REMOTE_HOST'}
Referer: $ENV{'HTTP_REFERER'}
Ip Address: $ENV{'REMOTE_ADDR'}

To validate, please go to:
$db_script_url

Sincerely,
Links Manager.
|;
Nootkan

Last edited by:

nootkan: Jan 16, 2009, 12:27 AM
Quote Reply
Re: [nootkan] Adding Ip address to Registration Process In reply to
NP - glad you got it sorted :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates