elimdeki iletisim formu scriptinde mesaj atanlarin ip'lerini gormek istiyorum.
Acaba scriptin neresinde girecegim kodlarla ip gosterebilirim .Yardimci olabilirseniz cok mutlu olurum .Kodlar aşşagıdadır.

Ayrıca ise yarabilecek (php scriptlerde ip gosterme kodları) 1-2 kod yolluyorum

<%
get_ip = Request.ServerVariables("REMOTE_ADDR")
Mail.Body = Request.Form("message") & "<br/>ip: " & get_ip
%>
YADA

$email_message .= ‘IP Address: ‘.$_SERVER['REMOTE_ADDR'].”\n”;
SCRİPTİN KENDİSİ.

/* Email address where the messages should be delivered */
$to = 'xxxxx';
/* This will be appended to the subject of contact form message */
$subject_prefix = 'İLETİŞİM ADRESİ';
/* Form width in px or % value */
$form_width = '70%';
/* Form background color */
$form_background = '#F7F8F7';
/* Form border color */
$form_border = '#CCCCCC';
/* Form border style. Examples - dotted, dashed, solid, double */
$form_border_style = 'solid';
/* Empty/Invalid fields will be highlighted in this color */
$field_error_color = '#FF0000';
/* Thank you message to be displayed after the form is submitted. Can include HTML tags. Write your message between <!-- Start message --> and <!-- End message --> */
$thank_you_message = <<<EOD
<!-- Start message -->
<p>Mesajiniz bize ulaştı.En yakın zamanda incelenecektir..</p><br /><br /><br /><br /><br /><br /><br /><br />
<!-- End message -->
EOD;
/* URL to be redirected to after the form is submitted. If this is specified, then the above message will not be shown and user will be redirected to this page after the form is submitted */
/* Example: $thank_you_url = 'http://www.yourwebsite.com/thank_you.html'; */
$thank_you_url = 'xxxxxx';
/*******************************************************************************
 *	Do not change anything below, unless of course you know very well 
 *	what you are doing :)
*******************************************************************************/
$label_name = 'İSİM';
$label_email = 'Email';
$label_subject = 'KONU';
$label_message = 'MESAJINIZ';
$label_code = 'KOD';
$name_value = '';
$email_value = '';
$subject_value = '';
$message_value = '';
$label_name_empty_style = '';
$label_email_empty_style = '';
$label_email_invalid = '';
$label_subject_empty_style = '';
$label_message_empty_style = '';
$label_code_empty_style = '';
$label_code_invalid = '';
if (!isset($_POST['submit'])) {
  showForm();
} else { //form submitted
  $error = 0;
  if(!empty($_POST['name'])) {
  	$name_value = clean_var($_POST['name']);
  	if (function_exists('htmlspecialchars')) $name_value = htmlspecialchars($name_value, ENT_QUOTES);
  }
  else {
    $error = 1;
    $label_name_empty_style = 'color:#FF0000;';
  }
  if(!empty($_POST['email'])) {
  	$email_value = clean_var($_POST['email']);
  	if (!ereg("^([a-zA-Z0-9_\.-]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", $_POST['email'])) {
  	  $error = 1;
  	  $label_email_empty_style = 'color:#FF0000;';
  	  $label_email_invalid = '<strong><span style="color:#FF0000;">Invalid email</span></strong>';
	  }
  }
  else {
    $error = 1;
    $label_email_empty_style = 'color:#FF0000;';
  }
  if(!empty($_POST['subject'])) {
  	$subject_value = clean_var($_POST['subject']);
  	if (function_exists('htmlspecialchars')) $subject_value = htmlspecialchars($subject_value, ENT_QUOTES);  	
  }
  else {
  	$error = 1;
    $label_subject_empty_style = 'color:#FF0000;';
  }  
  if(!empty($_POST['message'])) {
  	$message_value = clean_var($_POST['message']);
  	if (function_exists('htmlspecialchars')) $message_value = htmlspecialchars($message_value, ENT_QUOTES);
  }
  else {
    $error = 1;
    $label_message_empty_style = 'color:#FF0000;';
  }    
  if(empty($_POST['captcha_code'])) {
    $error = 1;
    $label_code_empty_style = 'color:#FF0000;';
  } else {
  	include_once "securimage.php";
		$securimage = new Securimage();
    $valid = $securimage->check($_POST['captcha_code']);
    if(!$valid) {
      $error = 1;
      $label_code_empty_style = 'color:#FF0000;';   
      $label_code_invalid = '<strong><span style="color:#FF0000;">Incorrect code</span></strong>';
    }
  }
  if ($error == 1) {
    $error_message = '<span style="font-weight:bold;font-size:90%;">Please correct/enter field(s) in red.</span>';
    showForm();
  } else {
  	if (function_exists('htmlspecialchars_decode')) $name_value = htmlspecialchars_decode($name_value, ENT_QUOTES);
  	if (function_exists('htmlspecialchars_decode')) $subject_value = htmlspecialchars_decode($subject_value, ENT_QUOTES);
  	if (function_exists('htmlspecialchars_decode')) $message_value = htmlspecialchars_decode($message_value, ENT_QUOTES);  	
    $message = "$name_value\n$email_value\n\nMessage:\n$message_value";
    mail($to,"$subject_prefix - $subject_value",$message,"From: $name_value <$email_value>");
    if (!$thank_you_url) {
      include 'form-header.php';
      echo $GLOBALS['thank_you_message'];
      echo "\n";
      include 'form-footer.php';
	  }
	  else {
	  	header("Location: $thank_you_url");
	  }
  }
} //else submitted
function showForm()
{
include 'form-header.php';
echo $GLOBALS['error_message'];  
echo <<<EOD
<div style="width:{$GLOBALS['form_width']};vertical-align:top;text-align:left;background-color:{$GLOBALS['form_background']};border: 1px {$GLOBALS['form_border']} {$GLOBALS['form_border_style']};overflow:visible;" id="formContainer">
<form method="post" class="contactForm">
<fieldset style="border:none;">
<p><label for="name" style="font-weight:bold;{$GLOBALS['label_name_empty_style']};width:25%;float:left;display:block;">{$GLOBALS['label_name']}</label> <input type="text" name="name" value="{$GLOBALS['name_value']}" /></p>
<p><label for="email" style="font-weight:bold;{$GLOBALS['label_email_empty_style']}width:25%;float:left;display:block;">{$GLOBALS['label_email']}</label> <input type="text" name="email" value="{$GLOBALS['email_value']}" /> {$GLOBALS['label_email_invalid']}</p>
<p><label for="subject" style="font-weight:bold;{$GLOBALS['label_subject_empty_style']}width:25%;float:left;display:block;">{$GLOBALS['label_subject']}</label> <input type="text" name="subject" value="{$GLOBALS['subject_value']}" /></p>
<p><label for="message" style="font-weight:bold;{$GLOBALS['label_message_empty_style']}width:25%;float:left;display:block;">{$GLOBALS['label_message']}</label> <textarea name="message" cols="40" rows="6">{$GLOBALS['message_value']}</textarea></p>
<p><label for="" style="font-weight:bold;width:25%;float:left;display:block;">&nbsp;</label> <img id="captcha" src="securimage_show.php" alt="CAPTCHA Image" /></p>
<p><label for="code" style="font-weight:bold;{$GLOBALS['label_code_empty_style']}width:25%;float:left;display:block;">{$GLOBALS['label_code']}</label> <input type="text" name="captcha_code" size="10" maxlength="5" /> {$GLOBALS['label_code_invalid']}</p>
<div style="margin-left:25%;display:block;">(Lütfen gördüğünüz rakam/harfleri bu kısımda giriniz.Büyük-küçük harf farketmemektedir.)<br />
<a href="#" onclick="document.getElementById('captcha').src = 'securimage_show.php?' + Math.random(); return false">Eğer kodu göremiyorsanız buraya tıklayınız.</a>
</div>
<p><span style="font-weight:bold;font-size:90%;">Tüm alanlar doldurulmaldır.</span></p>
<input type="submit" name="submit" value="Submit" style="border:1px solid #999;background:#E4E4E4;margin-top:5px;" />
</fieldset>
</form>
EOD;
include 'form-footer.php';
}
function clean_var($variable) {
    $variable = strip_tags(stripslashes(trim(rtrim($variable))));
  return $variable;
}
?>