• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Earthlink CGI script and Flash

Guest
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

I've created a contact form in Flash and the script can't find the URL at Earthlink. I've talked to EL and they said use the EL CGI html code and incorporate in the Flash script. I tried a multitude of ways and get constant syntax errors. My code has no errors but can't find the URL. I've attached my code and Earthlink's sample code. Can someone show me where to put what?
Thanks for any and all help.

Earthlink's code:
<h1>Sample Form</h1>
<hr>
<form method="post" action=" http://www.domain.com/cgi-bin/mailto"> 
<input type="hidden" name="RECIPIENT" value="user@domain.com"> 
<input type="hidden" name="THANKURL" value=" http://www.domain.com/thankyou.html"> 
<p> 
<b>Name:</b><input type="text" name="name" size="30"><br> 
<b>Email:</b><input type="text" name="email" size="30"><p> 
<b>Comments:</b><br> 
<textarea name="comments" rows="10" cols="50"></textarea>
<p> 
<input type="submit" value="Send"> 
<input type="reset" value="Clear"> 
</form> 
<p>


My Flash Code:
stop();

send_btn.onRelease = function() {
var my_lv:LoadVars = new LoadVars();

my_lv.firstName = firstName_txt.text;
my_lv.lastName = lastName_txt.text;
my_lv.email = email_txt.text;
my_lv.phone = phone_txt.text;

if (firstName_txt.text != "" && lastName_txt.text != "" && email_txt.text != "" && comments_txt.text != "")
{
my_lv.send(" http://www.domain.us/cgi-bin/mailto:me@domain.us","_blank","POST");
gotoAndStop("success");
}
else
{
gotoAndStop("error");
}
}
TOPICS
ActionScript

Views

23.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
replies 113 Replies 113
Guest
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

Here's the code I put in:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

ok, that's progress. if your el website is www.davidbrewer.com use:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

This what I get: The requested URL /DVL/cgi-bin/mailto was not found on this server.

I forgot to tell you that the DVL site is in a folder "DVL" in my site. Obviously, this makes a difference in the code. It's there for this testing purpose. Their actual site is up without the form page. Sorry.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

your swf being in DVL is significant. let's try:



Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

This is where the test site sits; http://www.davidbrewer.com/DVL/DVL.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 14, 2007 Apr 14, 2007

Copy link to clipboard

Copied

Just in case you're around today, we're back to the error message: "Sorry, this CGI is only available to sites hosted with EarthLink, Inc."

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 14, 2007 Apr 14, 2007

Copy link to clipboard

Copied

go to

https://cc.earthlink.net/control-center/login.jsp?redirect=%2Fcontrol-center%2Findex.jsp%3Fx%3D-1927715346&x=2058171029

login and search for some security check that earthlink performs for their email form or some faq about using flash and email forms.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 14, 2007 Apr 14, 2007

Copy link to clipboard

Copied

I've set the permissions right. There was no Info related to Flash. I've copied what I think might be pertinent:

PHP
PHP is a server-side scripting language. Like Perl scripts, PHP is executed 'on-the-fly' by your Web server. Unlike Perl, PHP scripts are embedded within your HTML files, making scripts easier to read, debug and understand.
Many Web-specific functions are built into PHP, facilitating advanced Web features such as form interpretation, cookies, http-header manipulation, database access, automatic headers and footers, dynamic page generation, etc. Learn more about PHP.
Supported PHP Versions
Your Web Hosting account supports PHP versions 4.1.2 and 5.0.5. PHP scripts are denoted by their extension, either .php4 or .php5. Files that end in .php4 will be interpreted by PHP 4.1.2, and those that end in .php5 will be interpreted by PHP 5.0.5.
Note: PHP 4.1.2 is supported only for backward compatibility with existing scripts, and will be phased out at some point in the future. We strongly recommend that new customers use version 5.0.5 (.php5).
Using .php Extensions
To use the extension '.php' for your PHP scripts, add the following line to your .htaccess file:
        AddHandler php5-script .php
The example above will result in files that end in .php being interpreted by PHP 5.0.5. To have them interpreted by PHP 4.1.2, change "php5-script" to "php4-script"
Note: Although your Web site is equipped with PHP, Customer Support cannot assist in the creation or maintenance of PHP scripts.

Executing Scripts
Scripts are worthless if you can't execute them. There are two ways to execute a script on your Web hosting account:
From a Web Browser
To execute a script in the /cgi directory, load the script directly from a Web browser using the following format:
  http://www.yourdomain.com/cgi/script_name.php
From a Web Page Form
Aside from accessing a script via an URL, you can also have a Web page execute a CGI script directly from an interactive form.
To execute your CGI from a form on a Web page, use the following format in your HTML code:
 <FORM ACTION = "/cgi/script_name.php">
Note: Scripts will not run unless you remember to set the permissions of your script to 755 (rwxr-xr-x).

Uploading Scripts
Using an FTP Client
To Upload a CGI Script Using FTP:
1. Using your favorite FTP client, connect to your Web server.
2. Upload your scripts to the /webdocs/cgi directory.
3. Using your FTP client, change the permissions of the file you uploaded to 755 (rwxr-xr-x) so that it can be executed.
Note: Don't forget to upload scripts to your /webdocs/cgi directory as text files and upload compiled binaries as binary files.

Troubleshooting
The following are some general problems that may occur when trying to implement scripts on your Web site.
• Double-check the first line in your Perl CGI script
•  Perl 5.008008 (5.8.8)
#!  /usr/local/perl588/bin/perl
• Perl 5.004_04
#!  /usr/local/bin/perl
• Perl scripts must be in Unix text format.
• The correct format for CGI files is ASCII (or text) format. Double check to make sure that your FTP Client has ASCII or text selected.
• Compiled executables must be uploaded in binary mode.
• If necessary, make sure the script is in the /cgi directory.
• Make sure permissions for all scripts are set to 755.
If the CGI script was found on another Web site, you may need to modify the script to get it to work. Most CGI scripts available online come with documentation.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 14, 2007 Apr 14, 2007

Copy link to clipboard

Copied

what did you set permissions on?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 15, 2007 Apr 15, 2007

Copy link to clipboard

Copied

rwx r-x r-x

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 15, 2007 Apr 15, 2007

Copy link to clipboard

Copied

on what file (or directory) did you set permissions?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 15, 2007 Apr 15, 2007

Copy link to clipboard

Copied

The CGI folder

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 15, 2007 Apr 15, 2007

Copy link to clipboard

Copied

that's probaby not helpful because there's nothing in there.

the problem is not a flash coding problem unless that redirect to their mail program is on another domain (which seems highly unlikely). you should call customer support and ask them what kind of security check is occuring that won't let you access their mail form from a website on their domain.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

I've been on the phone with EL for an hour and they don't support personal scripts and said that if I follow these 3 steps it should work. I took the swf and it's html page out of the DVL folder and put it in my root folder thinking that might help, but still get the same "Must be hosted at EL" message. I'll attatch the code again

Here are their steps again:
Once you've created your form, you will need to set the METHOD of the form to POST and the ACTION of the form to http://www.domain.com/cgi-bin/mailto where domain.com is the name of your domain. The final code will look like the following.
<FORM METHOD="POST" ACTION=" http://www.domain.com/cgi-bin/mailto">

where domain.com is your domain name.

You will also need to add the two hidden fields below in between the begin form tag and the end form tag:
<INPUT TYPE="HIDDEN" NAME="RECIPIENT" VALUE="user@domain.com">

<INPUT TYPE="HIDDEN" NAME="THANKURL" VALUE="URL_for_a_thankyou_page">

where user@domain.com is the email address to which you want the data from the form sent and URL_for_a_thankyou_page is the URL of a page (e.g., http://www.acme.com/thankyou.html) that you will need to create telling the user that the data from the form has been sent.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

i doubt this will work but try adding a ThankYou.html page even though you don't want to use one. (you can work-around using a redirect later to get back to your swf, if needed) and change the THANKURL to an absolute path:

lv.THANKURL=" http://www.davidbrewer.com/ThankYou.html";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

I still get the same message. Are we fighting a loosing battle here? What if I upload a CGI form script to my CGI folder and use that to process the form? There are many on the internet. Or, maybe using a totally different flash script? You've spent so much time helping me and, without any help from EL, you/we seem to be swimming upstream and there's a Bear with his mouth open just waiting to chomp!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

the flash coding is not the problem. there's some security check on el's part that's not accepting a call to their mailto script from a swf.

if you use a php or perl mail script you won't have the security problem and that seems the best route to go. i can help with both but i've been using php more lately so i can help more with php.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

I've found a quality perl script (I think) but have no idea what part(s) or all I really need. Can I paste it here or in the code window for you to look at and maybe you can tell me which parts or all that I need to upload. Just let me know if you really want to continue on this neverending project or not and, if you do, which do you want me to do, paste or attach. It seems like a pretty long code with explanations.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

is it formmail.pl?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

Yes. formmail.pl 3.14

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

Wondering what time zone you're in? I'm in EDT. Just so we're typing in your time zone.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

no, i'm in pdt.

go ahead and load formmail.pl into your cgi folder. read the comments at the beginning of formmail.pl, make the changes necessary for your use and paste the first 50 or 100 lines of formmail.pl here AFTER you make your changes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

This might take me a while. I'll post it in your AM. Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2007 Apr 16, 2007

Copy link to clipboard

Copied

you're welcome. (don't forget to set permissions on formmail.pl after you upload it.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

OK, the FormMail.pl (it kept adding a.txt extention after .pl. Is this OK?or should i remove it?) I've changed the permissions to rwx r-x r-x. What I changed is pasted below:
# USER CONFIGURATION SECTION
# --------------------------
# Modify these to your own settings. You might have to
# contact your system administrator if you do not run
# your own web server. If the purpose of these
# parameters seems unclear, please see the README file.
#
BEGIN
{
$DEBUGGING = 1;
$emulate_matts_code= 0;
$secure = 1;
$allow_empty_ref = 1;
$max_recipients = 1;
$mailprog = '/usr/lib/sendmail -oi -t';
$postmaster = 'db@davidbrewer.com';
@referers = qw();
@allow_mail_to = qw(db@davidbrewer.com);
@recipients = ();
%recipient_alias = ();
@valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
$locale = '';
$charset = 'iso-8859-1';
$date_fmt = '%A, %B %d, %Y at %H:%M:%S';
$style = 0;
$no_content = 0;
$double_spacing = 1;
$wrap_text = 0;
$wrap_style = 1;
$address_style = 0;
$send_confirmation_mail = 0;
$confirmation_text = <<'END_OF_CONFIRMATION';
From: you@your.com
Subject: form submission

Thank you for your form submission.

END_OF_CONFIRMATION

# You may need to uncomment the line below and adjust the path.
# use lib './lib';

# USER CUSTOMISATION SECTION
# --------------------------
# Place any custom code here



# USER CUSTOMISATION << END >>
# ----------------------------
# (no user serviceable parts beyond here)
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines