Re: Getting IP Address and previous URL from user??
| From: | Ignacio Dom�nguez | Date: | Sun, 12 Jan 2003 17:59:04 +0000 |
| Subject: | Re: Getting IP Address and previous URL from user?? | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-17793@lists.php.net to get a copy of this message | ||
Thanks! that was exactly what I needed. I used $_SERVER["HTTP_REFERER"]
instead of $_SERVER["HTTP_HOST"], which returned the complete url, not only
the host.
"Stephen Edmonds" <stephen.edmonds5@btinternet.com> wrote in message
news:006301c2ba54$76ee67b0$ae00a8c0@q...
> Sure. If you ever want to see what variables you can access and how they
are
> stored, simply write a script with
> phpinfo(32);
> in. It outputs ALL variables which you can access from your script. In
this
> case:
> Remote IP (Person who accessed the script)
> $_SERVER["REMOTE_ADDR"]
> File that was accessed (and directory)
> $PHP_SELF
> Name of host (e.g. localhost from http://localhost/page.php
> $_SERVER["HTTP_HOST"]
>
> ----- Original Message -----
> From: "Ignacio Domínguez" <ignacioxd@idcode.sytes.net>
> To: <php-windows@lists.php.net>
> Sent: Sunday, January 12, 2003 3:43 PM
> Subject: [PHP-WIN] Getting IP Address and previous URL from user??
>
>
> > Hi. Is it possible to get the IP Address and the URL from which a
request
> > was made to a PHP script? I need this to implement a security barrier.
> >
> > I have an image that links to a PHP script. I need the IP of the client
> that
> > clicked on the image and the URL of the page where the image is placed.
> >
> > Is this possible?
> >
> > Thanks in advance
> >
> > Ignacio Domínguez
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>