It is very simple:
$ip=$_SERVER['REMOTE_ADDR'];

On Tue, Dec 1, 2009 at 1:47 PM, Lester Caine <les...@lsces.co.uk> wrote:
> Lars Kristiansson wrote:
>>
>> Hi!
>>
>> This is probably the wrong forum. Please redirect me if im out of place.
>>
>> I would like to find out what IP address my visitor uses when visiting a
>> php script page on my domain. This page would contain a form in which the
>> visitor would state his/her message.
>>
>> My goal is to create purchase-orders written on unique files, and to
>> separate them my idea was to baptize files with the IP addresses, which
>> would ive each visitor an unique purchase-order...
>>
>> Any hints to a newbie?
>
> http://uk3.php.net/manual/en/reserved.variables.server.php
> 'REMOTE_ADDR'
>
> But don't rely on it to be the same each time for a customer. If they are on
> a shared connection then the ISP may give them a different IP each time they
> access the internet.
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk//
> Firebird - http://www.firebirdsql.org/index.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to