Comunidad de diseño web y desarrollo en internet online

AYUDA CON UN CODIGO .CGI ..URGENTEEEEE

Citar            
MensajeEscrito el 07 May 2009 11:53 pm
este es un ejemplo q baje.....pero necesito saber donde colocare mi servidor..y tb necesito saber..acerca de $MailProgram="/usr/lib/sendmail";



#!/usr/bin/perl

print "content-type :text/html \n\n";
$req=$ENV{'REQUEST_METHOD'};
read(STDIN,$buff,$ENV{'CONTENT_LENGTH'});
@pair=split(/&/,$buff);
@pair1=split(/=/,$pair[0]);
$pair1[1] =~ s/%(..)/pack("c",hex($1))/ge;
$pair1[1]=~ tr/"+"/" "/;
@pair2=split(/=/,$pair[1]);
$pair2[1] =~ s/%(..)/pack("c",hex($1))/ge;
$pair2[1]=~ tr/"+"/" "/;
@pair3=split(/=/,$pair[2]);
$pair3[1] =~ s/%(..)/pack("c",hex($1))/ge;
$pair3[1]=~ tr/"+"/" "/;
@pair4=split(/=/,$pair[3]);
$pair4[1] =~ s/%(..)/pack("c",hex($1))/ge;
$pair4[1]=~ tr/"+"/" "/;
@pair5=split(/=/,$pair[4]);
$pair5[1] =~ s/%(..)/pack("c",hex($1))/ge;
$pair5[1]=~ tr/"+"/" "/;
@pair6=split(/=/,$pair[5]);
$pair6[1] =~ s/%(..)/pack("c",hex($1))/ge;
$pair6[1]=~ tr/"+"/" "/;
$MailProgram="/usr/lib/sendmail";


$YourEmail="contactus\@growww.com";
$Subject="Growww: Online inquiry";
open (MAIL,"|$MailProgram -t");
print MAIL "To: $YourEmail\n";
print MAIL "From: $pair2[1]\n";
print MAIL "Subject: $Subject\n";
print MAIL "$pair5[1] has submitted the following information:\n\n";
print MAIL "Title: $pair6[1]\n";
print MAIL "Name: $pair5[1]\n";
print MAIL "Company: $pair4[1]\n";
print MAIL "Phone: $pair3[1]\n";
print MAIL "Email: $pair2[1]\n";
print MAIL "Comments: $pair1[1]\n";
close (MAIL);

print "&send=y";

Por Maja_fs

0 de clabLevel



 

msie
Citar            
MensajeEscrito el 08 May 2009 11:15 am
Usualmente los scripts en Perl van en la carpeta cgi-bin, sendmail es el demonio de mail mas común en los servidores Linux ... aunque yo usaría un simple script de PHP, mas fácil

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.