Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 20
  1. #1

    :::convertire da PHP a ASP:::

    Ciao a tutti!
    io ho questo form in php che si interfaccia con flash perfettamente funzionante... ma il server in cui sarà ospitato il sito supporta solo ASP..
    ora è possibile convertire questo codice PHP in ASP senza dover rifare tutto??
    In Asp non sò una mazza .. mi potete aiutare??
    codice:
    <?php
    $adminaddress = "info@miosito"; 
    $siteaddress ="http://www.miosito.it"; 
    $sitename = "miosito"; 
    
    //non cambiare niente
    // Gets the date and time from your server
    $date = date("m/d/Y H:i:s");
    
    // Gets the IP Address
    if ($REMOTE_ADDR == "") $ip = "no ip";
    else $ip = getHostByAddr($REMOTE_ADDR);
    
    // Gets the POST Headers - the Flash variables
    $action = $HTTP_POST_VARS['action'] ;
    $mail = $HTTP_POST_VARS['mail'] ;
    $nome = $HTTP_POST_VARS['nome'] ;
    $cognome = $HTTP_POST_VARS['cognome'] ;
    $azienda = $HTTP_POST_VARS['azienda'] ;
    $testo = $HTTP_POST_VARS['testo'] ;
    
    //Process the form data!
    // and send the information collected in the Flash form to Your nominated email address
    
    if ($action == "send") {
    	//
    	mail ("$adminaddress","Email da sito",
    	"il visitatore del sito ha lasciato le seguenti informazioni\n
    	Nome: $nome 
    	Cognome:$cognome
    	Azienda:$azienda
    	Email: $mail\n
    	Il suo commento:
    	------------------------------
    	$testo
    	
    	Info registrate :
    	------------------------------
    	Using: $HTTP_USER_AGENT
    	Hostname: $ip
    	IP address: $REMOTE_ADDR
    	Date/Time:  $date","FROM:$adminaddress" ) ; 
    	
    	//This sends a confirmation to your visitor
    	mail ("$mail","Grazie per aver visitato $sitename", 
    	"Egregio $nome $cognome,\n
    	la ringraziamo per averci contattato dal nostro sito:  $sitename!\n
    	le risponderemo appena possibile
    	Cordiali Saluti,
    	$sitename
    	$siteaddress","FROM:$adminaddress") ; 
    	
    	//Confirmation is sent back to the Flash form that the process is complete
    	$sendresult = "Grazie riceveraà un e-mail di conferma";
    	$send_answer = "answer=";
    	$send_answer .= rawurlencode($sendresult);
    	echo $send_answer;
    } //
    
    
    ?>
    ?>
    Designer ci si i(n)venta...
    www.3dtre.com

  2. #2
    un aiutino?? chiedo l'intervento del pubblico...
    Designer ci si i(n)venta...
    www.3dtre.com

  3. #3
    dammi un attimo di tempo ke te lo faccio...ciao
    Teejay - Just a Flash Web-designer

    L4TN.net - Live4theNight, Enjoy your night life!

  4. #4
    Originariamente inviato da teejay
    dammi un attimo di tempo ke te lo faccio...ciao
    Grazie a 2000!!
    aspetto con ansia!!
    Designer ci si i(n)venta...
    www.3dtre.com

  5. #5
    ..... okkey ho capito devo rifare tutto...
    Designer ci si i(n)venta...
    www.3dtre.com

  6. #6
    Ultimo tentativo .. c' ho grossa grisi...
    teejay dove sei???
    Designer ci si i(n)venta...
    www.3dtre.com

  7. #7
    Utente di HTML.it L'avatar di Baol74
    Registrato dal
    Jul 2002
    Messaggi
    2,004
    Devi inviare una mail da asp, non è difficile. Cerca sul forum.

    HTTP_POST_VARS diventa Request.Form(NomeVariabile)
    GetHostByAddr non puoi tradurlo metti Ip = Request.ServerVariables("REMOTE_ADDR")

  8. #8
    Originariamente inviato da Baol74
    Devi inviare una mail da asp, non è difficile. Cerca sul forum.

    HTTP_POST_VARS diventa Request.Form(NomeVariabile)
    GetHostByAddr non puoi tradurlo metti Ip = Request.ServerVariables("REMOTE_ADDR")
    Ho già degli altri script in asp per inviare e-mail che si interfacciano con flash.. però non mi soddisfano molto .. questo script in PHP invece lo utilizzo con soddisfazione da un po' ...
    Ora, siccome per un sito che ho fatto ho un serverin cui hanno problemi ad installare PHP e usano solo ASP chiedevo se qualcuno mi poteva dare una mano a convertire questo PHP in ASP..

    come hai iniziato a fare tu!! se mi puoi aiutare a tradurlo tutto in ASP ti sarei veramente grato .. e magari puo' essere utile pure a te avere un valido form in Flash-ASP...

    Designer ci si i(n)venta...
    www.3dtre.com

  9. #9
    scusa se ho ritardato un po...ciauz!
    codice:
    <%
    
    adminaddress = "info@miosito"
    siteaddress ="http://www.miosito.it"
    sitename = "miosito"
    
    today = now()
    thedate = data = Day(today) & "/" & Month(today) & "/" & Year(today) & " - " & Hour(today) & ":" & Minute(today) & ":" & Second(today)
    
    ip = Request.ServerVariables("REMOTE_ADDR")
    
    
    action = Request.Form("action")
    mail = Request.Form("mail")
    nome = Request.Form("nome")
    cognome = Request.Form("cognome")
    azienda = Request.Form("azienda")
    testo = Request.Form("testo")
    
    
    if (action="send") then
    
       Set Oggetto1 = CreateObject("CDO.Message")
           Oggetto1.Subject = "Email da sito"
           Oggetto1.From = adminaddress
           Oggetto1.To = adminaddress
           Oggetto1.TextBody = "Il visitatore del sito ha lasciato le seguenti informazioni:" & VBcrlf & "Nome:" & nome & VBcrlf & "Cognome:" & cognome & VBcrlf & "Azienda" & azienda & VBcrlf & "Email" & mail & VBcrlf & "Il suo commento" & VBcrlf & "-------------" & VBcrlf & testo & VBcrlf & VBcrlf & "Info registrate:" & VBcrlf & "-------------" & VBcrlf & "Using:" & Request.ServerVariables("HTTP_USER_AGENT") & VBcrlf & "IP address:" & ip & VBcrlf & "Date/Time:" & thedate
    
           Oggetto1.Send
    
       Set Oggetto1=Nothing
    
       Set Oggetto2 = CreateObject("CDO.Message")
           Oggetto2.Subject = "Grazie per aver visitato" & sitename
           Oggetto2.From = adminaddress
           Oggetto2.To = mail
           Oggetto2.TextBody = "Egregio " & nome & " " & cognome & "," & VBcrlf & "la ringraziamo per averci contattato dal nostro sito:  " & sitename & "!" & VBcrlf & "le risponderemo appena possibile" & VBcrlf & "Cordiali Saluti," & VBcrlf & sitename & VBcrlf & siteaddress
    
           Oggetto2.Send
    
       Set Oggetto2=Nothing
    
    
    Response.write("answer=Grazie ricever%224 una mail di conferma")	
    
    
    %>
    Teejay - Just a Flash Web-designer

    L4TN.net - Live4theNight, Enjoy your night life!

  10. #10
    Utente di HTML.it L'avatar di Baol74
    Registrato dal
    Jul 2002
    Messaggi
    2,004
    Request.Form('testo')

    Metti i doppi apici

    Request.Form("testo")

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.