Salve a tutti!
Vorrei che quando mi inviano un form, oltre ai vari dati (nome e cognome ecc.) mi venga restituito anche l'i.p. dell'utente che invia il form.
E' possibile farlo?
Il mio file di configurazione è sottoriportato.
Credo che vada aggiunta qualche riga di codice nella parte finale del file ma non so dove e come..mi aiutate per favore?
Grazie!
<?php
$Oggetto = "$SUBJECT";
$Testo = "";
$Testo .= "---------------------DATI RICHIEDENTE--------------------------\n";
if($nome!='') {
$Testo .= "Nome: $nome\n";
}
if($cognome!='') {
$Testo .= "Cognome: $cognome\n";
}
if($ditta!='') {
$Testo .= "Ditta: $ditta\n";
}
if($citta!='') {
$Testo .= "Città: $citta\n";
}
if($provincia!='') {
$Testo .= "Provincia: $provincia\n";
}
if($cap!='') {
$Testo .= "C.A.P.: $cap\n";
}
if($via!='') {
$Testo .= "Via: $via\n";
}
if($civico!='') {
$Testo .= "N° Civico: $civico\n";
}
if($telefono1!='') {
$Testo .= "Telefono: $telefono1\n";
}
if($telefono2!='') {
$Testo .= "Telefono reperibile: $telefono2\n";
}
if($cellulare!='') {
$Testo .= "Cellulare: $cellulare\n";
}
if($codicefisc!='') {
$Testo .= "Cod. Fisc.: $codicefisc\n";
}
if($piva!='') {
$Testo .= "P.IVA: $piva\n";
}
if($nomestudio!='') {
$Testo .= "Nome dello studio: $nomestudio\n";
}
$Testo .= "E-mail: $email\n";
$Testo .= "---------------------PRESTAZIONI PROFESSIONALI RICHIESTE--------------------------\n";
#DATI PREVENTIVO#
if($select!='') {
$Testo .= "-----------------------------------------------\n";
$Testo .= "IL PROGETTO RIGUARDA: $select\n";
}
if($select2!='') {
$Testo .= "TRATTASI DI FABBRICATO DI: $select2\n";
}
if($select3!='') {
$Testo .= "SUPERFICIE COPERTA: $select3\n";
}
if($select4!='') {
$Testo .= "QUALITA RENDERING: $select4\n";
}
if($select5!='') {
$Testo .= "IMPORTO DELL' OPERA: $select5\n";
}
if($select6!='') {
$Testo .= "PRESTAZIONE RICHIESTA: $select6\n";
}
if($select7!='') {
$Testo .= "TEMPI DI CONSEGNA: $select7\n";
}
###################
#################
$Testo .= "----------------------------------------------------------\n";
if($Note!='') {
$Testo .= "Domanda:\n";
$Testo .= "$Note\n";
$Testo .= "----------------------------------------------------------\n";
$Testo .= "\n\n";
}
$contenents = ereg_replace ("[\]", "", $Testo);
$From = "From: $email\nReply-To: $email\nX-Mailer: PHP/" . phpversion();
mail("info@visurnet.com", $Oggetto, $contenents, $From);
### Invia una copia del messaggio all'utente ###
$Testo_1 .= "\n\n";
$Testo_1 .= "Abbiamo ricevuto la sua richiesta di preventivo";
$Testo_1 .= "\n\n";
$Testo_1 .= "Le risponderemo nel più breve tempo possibile";
$Testo_1 .= "\n\n";
$Testo_1 .= "La ringraziamo per averci contattato e la saluttiamo cordialmente.";
$Testo_1 .= "\n\n";
$Testo_1 .= "geom. Pino Caddeo\n ";
$Testo_1 .= "coord. servizio visure catastali online\n ";
$Testo_1 .= "www.visurnet.com\n ";
$From_1 = "From: info@visurnet.com\nReply-To: info@visurnet.com\nX-Mailer: PHP/" . phpversion();
mail("$email", $Oggetto, "$Testo_1 $contenents", $From_1);
?>