This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > February 2006 > Can you pass IP address via form?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Can you pass IP address via form?
|
|
| manou 2006-02-24, 10:15 am |
| hello;
I have a form in my web site, which visitor will sign up for my newsletter, a
simple form having a name and email address, but I want to have the IP address
of the visitor who has signed up for my newsleter,
is it possible to have a hidden input to pass the IP address as well?
if so please help me out, I don't know how to do it,
I want to have the IP address just in case if it has been a spam complain, I
could provide the ip address, date.
thanks for help.
Manou
| |
| redpixel 2006-02-24, 10:15 am |
| Of course it is possible.
If for date you can use something like this:
<input type="hidden" name="form_date" value="<?php echo date("Y-m-d
H:i:s")?>">
for IP Address you use $_SERVER constant:
<input type="hidden" name="form_ip" value="<?php echo
$_SERVER['REMOTE_ADDR']; ?>">
| |
| Baxter 2006-02-24, 10:15 am |
| What sever language are you using
Dave
"manou" <webforumsuser@macromedia.com> wrote in message
news:dtlj19$48e$1@forums.macromedia.com...
> hello;
> I have a form in my web site, which visitor will sign up for my
newsletter, a
> simple form having a name and email address, but I want to have the IP
address
> of the visitor who has signed up for my newsleter,
> is it possible to have a hidden input to pass the IP address as well?
>
> if so please help me out, I don't know how to do it,
> I want to have the IP address just in case if it has been a spam
complain, I
> could provide the ip address, date.
>
> thanks for help.
> Manou
>
| |
| manou 2006-02-24, 10:15 am |
| thanks for reply,
my pages all are in html, but I guess if there are some script out there in php, I can hanld it to put it in my page,
thanks
| |
| Gary White 2006-02-24, 10:15 am |
| On Fri, 24 Feb 2006 00:12:25 +0000 (UTC), "manou"
<webforumsuser@macromedia.com> wrote:
> is it possible to have a hidden input to pass the IP address as well?
It would be better to have the script that processes the form grab the
IP address. Hidden fields can be faked and/or modified. How you would do
that would depend on what script was processing the form.
Gary
| |
| Baxter 2006-02-24, 10:15 am |
| Sorry I can't help you with that one only in asp vbscript. How are you
storing this info that your get in the email? Are you using only a mailto:
for the email form info?
Dave
"manou" <webforumsuser@macromedia.com> wrote in message
news:dtln1j$92j$1@forums.macromedia.com...
> thanks for reply,
> my pages all are in html, but I guess if there are some script out there
in php, I can hanld it to put it in my page,
> thanks
| |
| Kristian Todd 2006-02-24, 10:15 am |
| In your server side tags <% %> you can do the following: -
<%
Dim nIPAddy
nIPAddy = Request.ServerVariables("REMOTE_ADDR")
%>
Or if you wanted to could store this in the session and then use it where
ever you needed.
HTH
"Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote in message
news:dtlktn$6jj$1@forums.macromedia.com...
> What sever language are you using
> Dave
> "manou" <webforumsuser@macromedia.com> wrote in message
> news:dtlj19$48e$1@forums.macromedia.com...
> newsletter, a
> address
> complain, I
>
>
| |
| Murray *TMM* 2006-02-24, 10:15 am |
| Be aware that any IP address you get will only direct you to the ISP, not to
the visitor, since those are assigned dynamically at connect time, and can
change from one day to the next.
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote in message
news:dtloqd$b4r$1@forums.macromedia.com...
> Sorry I can't help you with that one only in asp vbscript. How are you
> storing this info that your get in the email? Are you using only a mailto:
> for the email form info?
> Dave
> "manou" <webforumsuser@macromedia.com> wrote in message
> news:dtln1j$92j$1@forums.macromedia.com...
> in php, I can hanld it to put it in my page,
>
>
| |
| robot88888888 2006-02-24, 10:15 am |
| In case you still want to get the IP address with PHP:
http://us3.php.net/getenv
"Murray *TMM*" <forums@HAHAgreat-web-sights.com> wrote in message
news:dtmusq$l0$1@forums.macromedia.com...
> Be aware that any IP address you get will only direct you to the ISP, not
> to the visitor, since those are assigned dynamically at connect time, and
> can change from one day to the next.
>
> --
> Murray --- ICQ 71997575
> Team Macromedia Volunteer for Dreamweaver
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote in message
> news:dtloqd$b4r$1@forums.macromedia.com...
>
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|