Anyone Know CGI/Perl - i need help please?

free web hosting
Free Web Hosting, No Ads > General > Hosted Members Area

Anyone Know CGI/Perl - i need help please?

Trystim
If anyone knows cgi/perl would like to contact me and help with a simple send mail problem lol *cuz i have no clue* please feel free or post here but messenger probably better

yahoo is p00l_dem0n77
msn is p00l_dem0n77@hotmail.com
icq is 255-051-386)


thanks in advance

Reply

mobileunlocking
why not go to hotscripts.com they have some good help they can offer you.

they do all kinds of stuff like flash and dhtml html php and lots more.

Worth trying out.

Mick

Reply

Trystim
it isn't a script I need it is how to set it up that i need

Reply

riao
I may be of some assistance... what is the script and the problem you're having? (Be as detailed as possible).

Reply

Trystim
CODE
#!/usr/local/bin/perl
# NOTE- on above line- your path to PERL could be different!
# If you're not sure, check with your web host.
# NOTE- again, your path to sendmail could be different
$mailprog = "/usr/lib/sendmail";
# NOTE- this is where you want the email sent to.
# Be sure and "escape" the "@" sign.
$recipient = "sitemail@timsmed.com";
# get the input
# put it in $buffer
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
# split the input into name-value pairs
@pairs = split(/&/, $buffer);
# standard processing loop
# this will un-URLencode as many variables as you send and place
# in an array ($FORM).
foreach $pair (@pairs) {
# split the name-value pair into name and value
($name, $value) = split(/=/, $pair);
# convert '+' to space
$value =~ tr/\+/ /;
# convert embedded comma to space delimiting purposes
$value =~ tr/\,/ /;
# convert hex symbols to alphanumeric
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("c", hex($1))/ge;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("c", hex($1))/ge;
$value =~ s/<!--(.|\n)*-->//g;
# create new array with each name and value as elements
$FORM{$name} = $value;
}
# now assign a variable name to each value from the input array
$NAME = $FORM{'name'};
$EMAIL = $FORM{'email'};
$SUBJECT = "Web Site Inquiry";
$MESSAGE = $FORM{'message'};
# next we have to re-URLencode any values being sent back to flash.
# for my contact form I'm only going to send the name.
$NAME =~ tr/ /\+ /;
# this assigns a "name" to our name/value pair being sent
# and sends it back to flash through the standard output stream.
# be sure and note the content type!
print "Content-type: application/x-www-urlform-encoded\n\n";
print  "rtn_name=$NAME";
# now we open a stream to "sendmail" and send the email
# using the variables from above.
open (MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n";
print MAIL "To: $recipient\n";
print MAIL "From:$EMAIL\n";
print MAIL "Subject: $SUBJECT\n";
print MAIL "------------------------------------------------------\n";
print MAIL "$MESSAGE\n\n";
print MAIL "$NAME\n";
close (MAIL);
exit;


that is my perl code that i have in my cgi folder.

here is the form that wont send or submit done in flash
form for submit
and you can download the fla here appx 2 megs
Righ Click Save As

that is about as specific as i can get. Let me know if you have an questions.

 

 

 


Reply

riao
1st line (path to perl) should be:

#!/usr/bin/perl

path to sendmail should be:

$mailprog = "/usr/sbin/sendmail";

(At least the above is true for my account.. I assume yours would be the same. It would only be different if our accounts resided on different servers. This info can be found in your cpanel).

Make sure $recipient = your email address

make sure the file is chmodded to 755 in the cgi bin.

Sorry, I cannot open the fla file here. I don't have flash installed on my system. Would you be able to give me a mock-up html form i could i could see?

One thing that you could look for is ACTION of the form contains the url of this file, and the method = POST.. like this:
<form ACTION="http://yoursite.trap17.com/cgi-bin/mailprog.cgi" method="POST">

(mailprog.cgi of course should be replaced by the name of this file).

If that doesn't work try method="GET"

Reply

Trystim
Well i fixed the 2 lines you said about correcting you can find the html and swf version at the following locations.
http://www.timsmed.com/contact/contact1.html
http://www.timsmed.com/contact/contact1.swf
i still get an error not sure as to why so i contacted the sites customer support because i am at ends with this tongue.gif but thanks for your help riao those 2 lines did need changed.

Reply

riao
The html page doesn't really do me much good as all it does is insert the .swf file. It doesn't show how it sends the data to the mail prog. That is in the swf file that I cannot open.

What is the error you are getting? Did you CHMOD the file to 755 after putting it in your cgi folder?

If you want I could send you a working mailscript. It won't be a flash file, but I could make it operate the was this one is supposed to. I would just need to know what email address you would want the form data sent to.

What's more is if you know how to set up a simple html form, you can set up others as well with no changes made to the cgi script.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : cgi, perl

  1. Perl For Automated Web Form Search
    (1)
  2. Perl Regular Expresions Regex
    Learn how to use regular expressions (2)
    I've searched the Tutorials section, but haven't found a RegEx tutorial, so I thought
    I'd add one, since it's very usefull to know regular expressions if you're a
    programmer... If I overlooked a tutorial explaining RegEx, my bad, just erase this tutorial... Ok,
    first off, regular expressions are a great functionality of Perl, but the can also be found in other
    languages and environments, such as linux shells, or PHP... I'm guessing most people would be
    interesten in useing regular expressions in PHP... Let's go on with a complex matching reg....
  3. Perl Interactive Mode
    (2)
    I am kind of wondering why for some reason, Perl does not have an interactive mode in its parser
    like Pythong does in its. Also, Python comes pre-packaged with a GUI like parser and it is written
    in Python\Tk (I think that's what its called). I know that Perl has Perl\Tk, and I
    know it has an eval function. Why is there no interactive parser like that. I think I could come up
    with one. Anybody, wanna see if we can build a interactive module like the Python one?....
  4. Perl As A Way To Program Desktop Applications
    (8)
    I know that Perl is very common for CGI scripts and is used in many web applications. I also know
    that Perl can be run from the command-line for basic applications. Anybody ever make desktop
    applications in Perl or do most people strictly use Perl for CGI and use C(++) or Visual Basic for
    desktop applications. I am curious because I would like to attempt to create a game in Perl and
    distribute it. Of course it could only work for people who have Perl installed. Just wondering.....
  5. Where Do I Install Perl Scripts?
    Help, i need somebody help... :P (6)
    Where do i install perl scripts? I couldn't find the path (usr/bin/perl/) and i tried to put one
    script on /home/ /public_html and execute it from a php script, but, nothing happened, the script
    was not working, and yes, the script works properly. The reason for not working is the wrong path i
    suppose.....
  6. What Is Perl ? For A Layman Like Me !
    (7)
    hi, i was wondering what perl was i downloaded Activeperl thinking it is some thing like a CMS lol
    but.... well u know what is it what can you do with it, i really want to know why it is soo famous ?
    hehe thx Scan....
  7. So...what's The Perl Deal?
    Where do I learn it, how can I use it on my hosting account? (0)
    I've been reading about PERL on some HTML teaching website, which also teached some stuff with
    PERL, unfortunately, I don't get how to use it. So, what I want to know/just want: A simple
    guide to PERL How can I use it on my acc. Uh, that's all, thank for all by now.....
  8. Few Perl Snippets For Misc Things
    (2)
    Convert any number of seconds to days,hours,minutes and seconds. Useful for converting unix time
    differences into days,hours,minutes and seconds. Inputs: ConvertSeconds(no. of seconds) Returns:
    $days,$hours,$minutes,$seconds Assumes: 100% Accurate CODE     
        sub ConvertSeconds {    my $secs=shift;     if($secs<(60*60*24)){
        $days=0;     }     else{     $days=int($secs/(60*60*24));     }
        if((int($secs%60*60*24))<60*60){     $hours....
  9. Good Php, Mysql, Perl, Postgresql, Html, Css Etc For Linux?
    Going to the good side, but dont really feel like emulating ZDE... (2)
    Im going over to the good side, (getting Ubuntu next Monday), and need a good PHP++ editor for
    Linux. There are just so frikken many out there that it is scary. Prefferable with minimal HTML
    WYSIWYG editor, and parsing preview (similar to what ZDE has, maybe?) Anyone got any Ideas to share
    with a n00b? I feel very small at the moment /sad.gif" style="vertical-align:middle" emoid=":("
    border="0" alt="sad.gif" /> And no, it will be running most of the day, so dont say to emulate
    some window thing... /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" a....
  10. Is Perl Better Than Php ?
    (9)
    Though i have looked into few articles , on PERL vs PHP , iam confused , ... I want to know , if
    PERL or PHP is better ? THough they may perform well in their certain areas , they do at last have
    to compete directly ... So finally , is PHP better than PERL , or is it the other way around ???....
  11. Problem Running Perl Scripts
    (8)
    Hi, I'm having problems running my perl scripts. My website returns a page that says Internal
    Server Error and in the error log it gives me: error: file has no execute permission: but I
    already set my perl scripts to all have permission 755. What else could it be? The scripts run fine
    when I host them on my own computer using IIS. Any suggestions? Thanks, Ed. ....
  12. Xampp
    A fast installation for php, mysql, perl (1)
    Hi all! so what is xampp, well it is an insallation that contains php, mysql, filezila, mercury
    mail, phpmyadmin, perl and the common products a developer could need. What i like the most about
    xampp is the easiest way you can install it, also you can switch from php4 to php5 with an useful
    switcher contained in the installation folders, i never had the chance to have php5 up and running
    and nor mysql4.x so if you were like me with lots of problems in the php or mysql installation
    definately this product is for you. But what about the ftp folders? good question, i ha....
  13. Perl Question.
    Need hELp PLZ (2)
    First of all, thank you for the free web hosting @ Trap17.net. I am new to cgi scripting and lucky
    2 find ur site for practicing and developing some new script also intend to have my first personal
    cgi website, when I wanted to install a cgi script I was requested the following information: Ask
    your provider for the path to perl, is it: #!/usr/bin/perl #!/usr/local/bin/perl
    #!/bin/perl Please help. Thanx. ....
  14. Call C Code From Perl
    (1)
    I want to call a C routine from Perl program. For this I understand that, I should use XS interface
    language & write some layer between Perl and C. Can anyone tell me the following: 1. What are
    development tools & settings I need to have for this development? 2. What are the steps to carryout
    for developing the interface and connect to Perl? Please note that, I am new to this kind of work.
    However, I have experience on C & to some extent Perl. I am in hurry..please help me. Thanks in
    advance, kvarnerexpress....
  15. The Uniform Server
    php, perl, apache, and mySQL for Win32 (5)
    Hi folks, nice place you've got here. I hope to stick around for a while. Hopefully this topic
    is new. I checked the archives and didn't see a match. I ran across a bundle of php, perl,
    apache, mySQL, and phpMyAdmin, and I must say that it rocks. Once this baby is installed you are
    four mouse clicks away from a gui to a live mySQL database. Okay, so you have to count a
    double-click as a single click, and I'm not including opening the folder, but that's still
    not too bad. It easily fits on even the smallest of USB drives, and executes without fanf....
  16. Matching Accents In Perl Regular Expresions
    matching accents in perl regular expresi (1)
    Does anyone knows how can i match accents in perl regular expresions. I do not manage to match not
    english characaters such as á, é or ñ. I hope there is someone taht knows the answer because i have
    been searching in google a long time without success. Thanks in advanced....
  17. Xmlhttprequest And Perl
    (2)
    Hi all I've been using XMLHttpRequest with PHP but the time has come where i need the features
    of perl! But i've fallen at the first hurdle.... when using XMLHttpRequest with php you can
    send a response back by using "echo" I cant seem to find a way of sending a response back in perl,
    anyone know of something similar to echo? I've looked through LWP but couldnt find anything
    suitable?? thanks kvarnerexpress....
  18. Compiling Perl / Python?
    is there a way to compile perl/python? (3)
    so im pretty new to programming in general, but these two languages i am even newer to. I'm
    trying to find out if there is a way to compile a perl/python program so that it is encrypted, and
    the source could not be read. or are these languages just scripts? Thanks.....
  19. Perl Interview Questions
    (1)
    Hi, I have to interview a job candidate for a position at my company. I have been put in charge of
    the perl questions. While I know a pretty good amount of perl, I was wondering if any of you could
    provide some good questions (w/ the answers please) that I might be able to ask. Thanks!....
  20. Perl Code Obfuscator V1.0
    Check out this usefull tool for perl dev (0)
    Here the author's description: Perl Code Obfuscator v1.0 QUOTE PCO is a GUI based
    freeware program for obfuscating and encrypting perl scripts. Removes comments, blank lines,
    replaces variable, array, hash, and sub names, and handles string and numerical values. Generates a
    short report detailing what it has done. Depending on the amount of feedback and interest expressed
    towards this program, more features (multiple file handling, watermarking in encryption ,etc.) may
    be added to future releases. Perl Code Obfuscator comes in a small zipped package (23 kb)....
  21. Auto choosing primary or secondary server (Perl)
    (0)
    This script can be useful if you have two servers with your website and you hate breakdowns, it
    checks is the primary server available and redirects to primary or secondary server. CODE
    #!/usr/bin/perl ## use LWP::UserAgent; use CGI; $| = 1; my $query = new CGI; $ua =
    LWP::UserAgent->new; $ua->agent("MyApp/0.1 "); my $req =
    HTTP::Request->new(GET => 'http://primary.server/index.php');
    $req->content_type('application/x-www-form-urlencoded'); $ua->timeout(10);
    ....
  22. Perl/cgi Help!
    HTML skills required also. (3)
    Im sort of new with perl and I know the basics. Lemme paste the code ... CODE
    #!/usr/bin/perl -w if ($ENV{'REQUEST_METHOD'} eq 'POST') {  
    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});   @pairs = split(/&/,
    $buffer);   foreach $pair (@pairs) {   ($name, $value) =
    split(/=/, $pair);   $value =~ tr/+/ /;   $value =~
    s/%([a-fA-F0-9][a-fA-F0-9])<br>/pack("C",
    hex($1))/eg;   &#....
  23. Perl 5.8.6
    (1)
    Currently, the server is running on Perl 5.8.4, it would be best if it ran on the newest technology.
    Also, you should really upgrade Apache and maybe PHP. xboxrulz....
  24. Hotscripts
    Free php/mysql cgi-/perl scripts (4)
    hello all here is a website for scripts for the website. Click Here Hotscripts I don't
    belive noone knows about it /tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif'
    /> XD....
  25. Perl Progamming/scripting
    Insighting discussion on Perl (3)
    Hi there, I like using Perl for programming. Most of the work I do with it eventually involves
    the web. I don't use it in a CGI environment though, I use it as a tier two processing
    language. How do you use perl (if at all), or why do you not like perl vs. your preferred
    language? Thanks, Kristofer Hoch ----------------- "Not a Perl Biggot"....
  26. Perl Cd Bookshelf Ver 4 - O'reilly
    Very Good Ebook (1)
    Here it is: MEMBER BANNED FOR POSTING ILLEGAL LINKS - ADMINISTRATOR.....
  27. Easy Authenication With Cgi/perl
    (0)
    I've been thinking for a while about how to authenticate users on my website ... i just wanted
    something simple, maybe cookies are good, etc. I found the following -->
    http://www.cgi101.com/book/ch20/ Not that I need anything super secure, and maybe it's worth
    looking into encrypting the password table in the database, i don't know. it's pretty cool
    though ... enjoy.....
  28. Perl V.s. Php
    PHP vs PERL : Comparision of PHP & PERL (5)
    Now I've always wanted to make a web game. Now I have time. I keep getting suggested both php
    and perl. I know alot about php and stuff. but I hardly know anything about perl .So what would (if
    anything) make perl better than php when programming a web game?....
  29. First Perl Programm
    My first Perl programm (5)
    I wonna show you my first perl programm: CODE #!/usr/bin/perl # See Log file print
    "Content-type: text/html\n\n"; print
    "<HTML><HEAD><TITLE>Mind of Perl</TITLE>"; print
    "<head><body><p>"; print "<h1>Hay
    Cgi-BIn</h1>"; print "</body></html>" if you have other
    perl script, post it in this topic. How write perl counter?....
  30. Perl Help
    How to install modules (1)
    How do I install perl modules??....

    1. Looking for cgi, perl

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for cgi, perl

*MORE FROM TRAP17.COM*
advertisement



Anyone Know CGI/Perl - i need help please?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE