Send IP address of the submitter?

Discussion in 'Programming' started by albertvn, Oct 13, 2008.

  1. #1
    Hello!

    I am not sure if this is the right place to ask for help.
    I have a booking form and I would like to capture the IP address of the submitter and send to me through email with all datas that he/she submitted.

    Is there any scripts or codes to do this?

    Thanks in advance for your kind help!
    Albert
     
    albertvn, Oct 13, 2008 IP
  2. nishanair

    nishanair Active Member

    Messages:
    188
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #2
    is that a php form? if it is then you can user

    $ip = getenv("REMOTE_ADDR");

    or

    $ip = $_SERVER['REMOTE_ADDR'];

    And use $ip as a hidden input field.
     
    nishanair, Oct 13, 2008 IP
  3. CarPriceDatabase

    CarPriceDatabase Guest

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hidden input field? I don't think you need it as in PHP you could directly get the IP address by the method you mentioned.
     
    CarPriceDatabase, Oct 14, 2008 IP
  4. albertvn

    albertvn Peon

    Messages:
    156
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thank you very much for your kind help. However I am using the component called Qcontact at Joomla so I am looking for what file to put the code in.
    If anyone here using this component, please kindly point out the file for me.

    Thanks!
    Albert
     
    albertvn, Oct 15, 2008 IP