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" <[EMAIL PROTECTED]> wrote in message 006301c2ba54$76ee67b0$ae00a8c0@q">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" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > 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 > > > > > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php