DaveThuet
Erfahrenes Mitglied
Hallo liebe User des Forums.
Wie kann ich in meinem bestehenden PHP-Formular die IP-Adresse des Absenders mitsenden lassen?
Hier meinen PHP-Code des Upload-Formular unter thuet.de:
Ich danke Euch für Eure Hilfe!
Wie kann ich in meinem bestehenden PHP-Formular die IP-Adresse des Absenders mitsenden lassen?
Hier meinen PHP-Code des Upload-Formular unter thuet.de:
PHP:
<?php
if (isset($_FILES['Durchsuchen1']) and ! $_FILES['Durchsuchen1']['error'] and $_FILES['Durchsuchen1']['size'])
{
$file1=$_FILES['Durchsuchen1']['tmp_name'];
$name1=$_FILES['Durchsuchen1']['name'];
$file_groesse1=$_FILES['Durchsuchen1']['size']/1024;
if (isset($_FILES['Durchsuchen2']) and ! $_FILES['Durchsuchen2']['error'] and $_FILES['Durchsuchen2']['size'])
{
$file2=$_FILES['Durchsuchen2']['tmp_name'];
$name2=$_FILES['Durchsuchen2']['name'];
$file_groesse2=$_FILES['Durchsuchen2']['size']/1024;
}
if (isset($_FILES['Durchsuchen3']) and ! $_FILES['Durchsuchen3']['error'] and $_FILES['Durchsuchen3']['size'])
{
$file3=$_FILES['Durchsuchen3']['tmp_name'];
$name3=$_FILES['Durchsuchen3']['name'];
$file_groesse3=$_FILES['Durchsuchen3']['size']/1024;
}
if (isset($_FILES['Durchsuchen4']) and ! $_FILES['Durchsuchen4']['error'] and $_FILES['Durchsuchen4']['size'])
{
$file4=$_FILES['Durchsuchen4']['tmp_name'];
$name4=$_FILES['Durchsuchen4']['name'];
$file_groesse4=$_FILES['Durchsuchen4']['size']/1024;
}
if (isset($_FILES['Durchsuchen5']) and ! $_FILES['Durchsuchen5']['error'] and $_FILES['Durchsuchen5']['size'])
{
$file5=$_FILES['Durchsuchen5']['tmp_name'];
$name5=$_FILES['Durchsuchen5']['name'];
$file_groesse5=$_FILES['Durchsuchen5']['size']/1024;
}
if (isset($_FILES['Durchsuchen6']) and ! $_FILES['Durchsuchen6']['error'] and $_FILES['Durchsuchen6']['size'])
{
$file6=$_FILES['Durchsuchen6']['tmp_name'];
$name6=$_FILES['Durchsuchen6']['name'];
$file_groesse6=$_FILES['Durchsuchen6']['size']/1024;
}
if (isset($_FILES['Durchsuchen7']) and ! $_FILES['Durchsuchen7']['error'] and $_FILES['Durchsuchen7']['size'])
{
$file7=$_FILES['Durchsuchen7']['tmp_name'];
$name7=$_FILES['Durchsuchen7']['name'];
$file_groesse7=$_FILES['Durchsuchen7']['size']/1024;
}
if (isset($_FILES['Durchsuchen8']) and ! $_FILES['Durchsuchen8']['error'] and $_FILES['Durchsuchen8']['size'])
{
$file8=$_FILES['Durchsuchen8']['tmp_name'];
$name8=$_FILES['Durchsuchen8']['name'];
$file_groesse8=$_FILES['Durchsuchen8']['size']/1024;
}
if (isset($_FILES['Durchsuchen9']) and ! $_FILES['Durchsuchen9']['error'] and $_FILES['Durchsuchen9']['size'])
{
$file9=$_FILES['Durchsuchen9']['tmp_name'];
$name9=$_FILES['Durchsuchen9']['name'];
$file_groesse9=$_FILES['Durchsuchen9']['size']/1024;
}
if (isset($_FILES['Durchsuchen10']) and ! $_FILES['Durchsuchen10']['error'] and $_FILES['Durchsuchen10']['size'])
{
$file10=$_FILES['Durchsuchen10']['tmp_name'];
$name10=$_FILES['Durchsuchen10']['name'];
$file_groesse10=$_FILES['Durchsuchen10']['size']/1024;
}
if (isset($_FILES['Durchsuchen11']) and ! $_FILES['Durchsuchen11']['error'] and $_FILES['Durchsuchen11']['size'])
{
$file11=$_FILES['Durchsuchen11']['tmp_name'];
$name11=$_FILES['Durchsuchen11']['name'];
$file_groesse11=$_FILES['Durchsuchen11']['size']/1024;
}
if (isset($_FILES['Durchsuchen12']) and ! $_FILES['Durchsuchen12']['error'] and $_FILES['Durchsuchen12']['size'])
{
$file12=$_FILES['Durchsuchen12']['tmp_name'];
$name12=$_FILES['Durchsuchen12']['name'];
$file_groesse12=$_FILES['Durchsuchen12']['size']/1024;
}
$inhalt='<font size="2px" face="Verdana" color="#000000"><b>Anrede:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Anrede.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Nachname:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Nachname.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Vorname:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Vorname.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Kategorie:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Kategorie.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Neue oder Diverse Kategorien:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Neue_oder_Diverse_Kategorien.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Bild Grösse:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Bild_Groesse.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Neue Bild Grösse vorschlagen:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Neue_Bild_Groesse_vorschlag.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Ihre Email Adresse:</b></font> <font size="2px" face="Verdana" color="blue"> '.$Email_adresse0.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Ihre Homepage:</b></font> <font size="2px" face="Verdana" color="blue"> '.$Ihre_Homepage.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Bestehender User-Name:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Bestehender_User_Name.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Neuer Link- oder User-Name:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Neuer_User.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Upload-Regeln:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Upload_Regeln.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 1:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name1.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 2:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name2.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 3:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name3.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 4:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name4.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 5:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name5.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 6:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name6.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 7:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name7.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 8:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name8.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 9:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name9.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 10:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name10.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 11:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name11.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Anlage 12:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$name12.'</font><br>
<font size="2px" face="Verdana" color="#000000"><b>Kommentar:</b></font> <font size="2px" face="Verdana" color="#FF6C1E"> '.$Kommentar;
if (($file_groesse1<8200) and ($file_groesse2<8200) and ($file_groesse3<8200) and ($file_groesse4<8200) and ($file_groesse5<8200) and ($file_groesse6<8200) and ($file_groesse7<8200) and ($file_groesse8<8200) and ($file_groesse9<8200) and ($file_groesse10<8200) and ($file_groesse11<8200) and ($file_groesse12<8200))
{
$mime_boundary = md5(uniqid(time()));
$data1 = chunk_split(base64_encode(implode("", file($file1))));
$data2 = chunk_split(base64_encode(implode("", file($file2))));
$data3 = chunk_split(base64_encode(implode("", file($file3))));
$data4 = chunk_split(base64_encode(implode("", file($file4))));
$data5 = chunk_split(base64_encode(implode("", file($file5))));
$data6 = chunk_split(base64_encode(implode("", file($file6))));
$data7 = chunk_split(base64_encode(implode("", file($file7))));
$data8 = chunk_split(base64_encode(implode("", file($file8))));
$data9 = chunk_split(base64_encode(implode("", file($file9))));
$data10 = chunk_split(base64_encode(implode("", file($file10))));
$data11 = chunk_split(base64_encode(implode("", file($file11))));
$data12 = chunk_split(base64_encode(implode("", file($file12))));
$content = "From: ".$Email_adresse0."\n";
$content.= "Reply-To: " . $Email_adresse0 . "\n";
$content.= "Return-Path: " . $Email_adresse0 . "\n";
$content.= "MIME-Version: 1.0\n";
$content.= "Content-Type: multipart/mixed; boundary=\"".$mime_boundary."\"\n";
$content.= "--$mime_boundary\n";
$content.= "Content-Type: text/html;\n";
$content.= "Content-Transfer-Encoding: 7bit\n\n";
$content.= $inhalt."\n\n";
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name1."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data1."\n";
if (isset($_FILES['Durchsuchen2']) and ! $_FILES['Durchsuchen2']['error'] and $_FILES['Durchsuchen2']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name2."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data2."\n";
}
if (isset($_FILES['Durchsuchen3']) and ! $_FILES['Durchsuchen3']['error'] and $_FILES['Durchsuchen3']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name3."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data3."\n";
}
if (isset($_FILES['Durchsuchen4']) and ! $_FILES['Durchsuchen4']['error'] and $_FILES['Durchsuchen4']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name4."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data4."\n";
}
if (isset($_FILES['Durchsuchen5']) and ! $_FILES['Durchsuchen5']['error'] and $_FILES['Durchsuchen5']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name5."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data5."\n";
}
if (isset($_FILES['Durchsuchen6']) and ! $_FILES['Durchsuchen6']['error'] and $_FILES['Durchsuchen6']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name6."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data6."\n";
}
if (isset($_FILES['Durchsuchen7']) and ! $_FILES['Durchsuchen7']['error'] and $_FILES['Durchsuchen7']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name7."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data7."\n";
}
if (isset($_FILES['Durchsuchen8']) and ! $_FILES['Durchsuchen8']['error'] and $_FILES['Durchsuchen8']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name8."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data8."\n";
}
if (isset($_FILES['Durchsuchen9']) and ! $_FILES['Durchsuchen9']['error'] and $_FILES['Durchsuchen9']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name9."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data9."\n";
}
if (isset($_FILES['Durchsuchen10']) and ! $_FILES['Durchsuchen10']['error'] and $_FILES['Durchsuchen10']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name10."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data10."\n";
}
if (isset($_FILES['Durchsuchen11']) and ! $_FILES['Durchsuchen11']['error'] and $_FILES['Durchsuchen11']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name11."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data11."\n";
}
if (isset($_FILES['Durchsuchen12']) and ! $_FILES['Durchsuchen12']['error'] and $_FILES['Durchsuchen12']['size'])
{
$content.= "--$mime_boundary\n";
$content.= "Content-Type: application/Octet-Stream; name=\"".$name12."\"\n";
$content.= "Content-Transfer-Encoding: base64\n";
$content.= "Content-Disposition: attachment;\n\n";
$content.= $data12."\n";
}
$content.= "--$mime_boundary--\n";
mail("XXX@XXX",".:: Ihr Upload auf der Wallpaper Area ::: www.thuet.de ::.","",$content);
header("Location: http://www.thuet.de/wallpaperdank.html");
exit;
}
}
?>