Want to Know How to get the IP Address sent in your FORM?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • wgreene
    Sergeant Major

    • Sep 2005
    • 89

    Want to Know How to get the IP Address sent in your FORM?

    So many people have helped me so I thought I would do the same for others after getting help from Navaldesign. Getting the IP address can be important for many reasons, mostly to prevent unethical behavior and to prevent fraud. If you want to get the IP address, and browser info from those who fill out your forms, heres what you do. In your form you must add the following input field similiar to:

    <input type=hidden name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT,REMOTE_USER,REM OTE_ADDR">

    just add this line in between similiar lines which might include your redirect page or required fields.

    Next open up your form script and look for the code below and make sure it looks like this:

    // if the env_report option is on: get eviromental variables
    if ($env_report) {
    $env_report = ereg_replace( " +", "", $env_report);
    $env_reports = split(",",$env_report);
    $content .= "\n------ eviromental variables ------\n";
    for ($i=0;$i<count($env_reports);$i++) {
    $string = trim($env_reports[$i]);
    if ($env_reports[$i] == "REMOTE_HOST")
    $content .= "REMOTE HOST: ".$_SERVER['REMOTE_HOST'] ."\n";
    if ($env_reports[$i] == "REMOTE_USER")
    $content .= "REMOTE USER: ". $_SERVER ['REMOTE_USER'] ."\n";
    if ($env_reports[$i] == "REMOTE_ADDR")
    $content .= "REMOTE ADDR: ". $_SERVER ['REMOTE_ADDR'] ."\n";
    if ($env_reports[$i] == "HTTP_USER_AGENT")
    $content .= "BROWSER: ". $_SERVER ['HTTP_USER_AGENT'] ."\n";
    }
    }

    Now for an easy to use script that this works with, try http://www.scriptarchive.com/download.cgi?s=formmail
    Download and follow the instructions exactly! Hope this helps someone!


    Elevate Your Music
    HipHopTraxx
    Blue Diamond Marketing
  • Marc Sanders
    Second Lieutenant

    • Mar 2006
    • 103

    #2
    Re: Want to Know How to get the IP Address sent in your FORM?

    superb, much needed information - cheers dude!

    Marc
    Marc Sanders

    Currently working on: www.fakeitbikinistore.co.uk
    Messenger: tealc_of_chulak********.com

    My philosophy: keep your friends close, enemies closer.....!

    Comment

    Working...
    X