Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Desperately seaking

Status
Not open for further replies.

dulcimers

Technical User
Jun 30, 2003
9
0
0
US
Ok, so maybe I'm not desperate, but I am in need of help.

I'm not a programmer. Just a busy, self-taught web designer with a dozen other jobs.

Recently I moved my domain from Concentric to Ipowerweb. Everything has worked quite well except that Concentric had a "library" of cgi scripts available for my use, and Ipowerweb expects me to provide my own scripts.

So far I've been successful locating and installing scripts to randomize my introductory photo, and another script to randomize music which opens the page. (You can see them in action at
But I have been unsuccessful locating a copy of a script I really need: form2file.

Form2file was one of the scripts which Concentric provided. With it, I was able to set-up a form on my website where workshop leaders could "register" classes they were willing to instruct at a music festival (where I'm the workshop coordinator). I still have the "html form" but obviously no form2file script to run it.

It was pretty straight-forward, and I've seen references to that script lots of places, but I can't find a copy of it. I'm pretty sure it's a cgi standard.

It allowed the individual who was registering to fill in the form, then the output was written to a txt file which was embedded in a html document. Once submitted, the individual was taken to the page that showed all of the classes with his as the most recent addition. Since each addition was added on, the workshop instructors could see the classes offered by those who had registered before them. They could "proof" their own copy, and stay abreast of the classes being offered.

Has anyone seen the script I am talking about on any of the perl or cgi script sites? I've looked high and low but without success. Yes, I can find similar scripts, but this one was "perfect"!! and it would be so nice if I could just set up the script on Ipowerweb. I already have the form prepared from previous years and my instructors are used to working with it.

Again, it is called form2file.

Sharon Skaryd
 
Sadly the above mentioned site didn't not provide a download. It may have at one time, but it was last updated in 1997 and was no longer functioning.

So I'm still looking!!

Sharon Skaryd
 
hmmm I have a mime encoded version of form2file.pl... can't figure out how to extract it <sigh>

anyone?

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Mike,
I have a perl module that can decode mime.
You can find it here at cpan.

The header should tell you what the encoding method
used was. ( Usually base64 );
I tried it on form2file.pl found on this page :
Looks like they might have modified the script.
Who knows what it originally was.
Here's the decoded output though :

#!/usr/bin/perl -w
print &quot;Content-type:text/html\n\n&quot;;
open(OUTF,&quot;>>/var/tmp/survey.out&quot;) or dienice(&quot;Couldn't open survey.out for writing: $!&quot;);
# This locks the file so no other CGI can write to it at the
# same time...
flock(OUTF,2);
# Reset the file pointer to the end of the file, in case
# someone wrote to it while we waited for the lock...
seek(OUTF,0,2);
print OUTF &quot;------- \n\n&quot;;
print OUTF scalar localtime(time);
print OUTF &quot;------- \n\n&quot;;
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])/pack(&quot;C&quot;, hex($1))/eg;
$value =~ s/\n/ /g; # replace newlines with spaces
$value =~ s/\r//g; # remove hard returns
$value =~ s/\cM//g; # delete ^M's
$FORM{$name} = $value;
print OUTF &quot;$name \t\t $FORM{$name} $value \n\n&quot;;
}
close(OUTF);

#print OUTF &quot;$FORM{'name'}|$FORM{'email'}|&quot;;
#print OUTF &quot;$FORM{'howreach'}|$FORM{'rating'}|&quot;;

print <<EndHTML;

<html><head><title>Thank You</title></head>
<body>
<h2>Thank You!</h2>
Thank you for your information.<p>
<a href=&quot; to information page</a><p>
</body></html>

EndHTML

sub dienice {
my($msg) = @_;
print &quot;<h2>Error</h2>\n&quot;;
print $msg;
exit;
}

If you want to post the encoded form2file.pl that you
have, I will be happy to decode it and repost the contents.

Take Care.
Crackn101
 
Crackn,

Thank you...

I think it's the same one though, have a look.

--60313769-532152488-1005861761=:5023
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=&quot;form2file.pl&quot;
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.33.0111151702410.5023@yorktown.chem.duke.edu>
Content-Description:
Content-Disposition: attachment; filename=&quot;form2file.pl&quot;

IyEvdXNyL2Jpbi9w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w0KCSR2YWx1
ZSA9fiBzL1xjTS8vZzsJIyBkZWxldGUgXk0ncw0KCSRGT1JNeyRuYW1lfSA9
ICR2YWx1ZTsNCiAJcHJpbnQgT1VURiAiJG5hbWUgXHRcdCAkRk9STXskbmFt
ZX0gJHZhbHVlIFxuXG4iOw0KDQp9DQoNCmNsb3NlKE9VVEYpOw0KDQoNCiNw
cmludCBPVVRGICIkRk9STXsnbmFtZSd9fCRGT1JNeydlbWFpbCd9fCI7DQoj
cHJpbnQgT1VURiAiJEZPUk17J2hvd3JlYWNoJ318JEZPUk17J3JhdGluZyd9
fCI7DQoNCg0KcHJpbnQgPDxFbmRIVE1MOw0KPGh0bWw+PGhlYWQ+PHRpdGxl
PlRoYW5rIFlvdTwvdGl0bGU+PC9oZWFkPg0KPGJvZHk+DQo8aDI+VGhhbmsg
WW91ITwvaDI+DQpUaGFuayB5b3UgZm9yIHlvdXIgaW5mb3JtYXRpb24uPHA+
DQo8YSBocmVmPSJodHRwOi8vd3d3LmNoZW0uZHVrZS5lZHUvY29tcHV0aW5n
L3NlcnZpY2VzIj5SZXR1cm4gdG8gaW5mb3JtYXRpb24gcGFnZTwvYT48cD4N
CjwvYm9keT48L2h0bWw+DQpFbmRIVE1MDQoNCnN1YiBkaWVuaWNlIHsNCglt
eSgkbXNnKSA9IEBfOw0KCXByaW50ICI8aDI+RXJyb3I8L2gyPlxuIjsNCglw
cmludCAkbXNnOw0KCWV4aXQ7DQp9DQoNCg==
--60313769-532152488-1005861761=:5023--




Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Howdy Yall. (Yep I'm in Texas hehe)
The script that you had was from the same page.
Although, I found another copy of this script.
I found it using .
<--- Direct link.

May be more of a complete script.
Take Care.
Crackn101

form2file.pl

#!/usr/local/bin/perl -w

#-- Form
#This script is OpenSource Under the GPL Liscense. If you use it please
#keep it that way. And I just want a bit of credit.
#Script By Brandon Robinette

#-- Instructions
#Install to your cgi-bin dir and chmod the script 755.
#Make a data file that matches the variable below then chmod it 666
#Change the URL in the HTML file and it's ready!

#-- Define Variables
#Title of the page
$title = &quot;ECE Headline Editor&quot;;
#The location of the file on the servers hard drive
$data = &quot;./news.txt&quot;;
#-- Variables Defined

#-- DO NOT EDIT BELOW THIS LINE
print &quot;content-type: text/html\n\n&quot;;
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])/pack(&quot;C&quot;, hex($1))/eg;
$value =~ s/~!/ ~!/g; $FORM{$name} = $value;}

$link = $FORM{'link'};
$story = $FORM{'story'};
$date = $FORM{'date'};
$image = $FORM{'image'};

open(data,&quot;>>$data&quot;);
print data &quot;\n&quot;;
print data &quot;$link|&quot;;
print data &quot;$date|&quot;;
print data &quot;$story|&quot;;
print data &quot;$image|&quot;;
print data &quot;\n&quot;;

print qq (<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;
&quot;print &quot;<html>\n\t<head>\n&quot;;
print &quot;\t<title>$title</title>\n&quot;;
print qq (<link href=&quot;./ENGR.css&quot; rel=&quot;Stylesheet&quot; type=&quot;text/css&quot;>\n);
print &quot;</head><body>\n&quot;;
print &quot;<b class=lg>Complete</b><br>\n&quot;;
print qq (<div class=sm>Your form has been processed.</div><br>\n);
print qq (<a href=&quot;news.txt&quot; class=&quot;roll-gold&quot;>Examine new data.</a></div>\n);
print &quot;</body></html>\n&quot;;
 
Thanks Crackn -- good of you.

Sharon - Hope these scripts help; let us know how you get on.

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Unfortunately so far the form2file scripts are different than the one I was using. I may be able to make the above script work, but it's definitely not the one I had before.

If you want to see the form from last year and get an idea of what I need, please go to
You'll see the form (which no longer works). You can click on the link at the top of the form (&quot;Go to Workshops that have been Submitted&quot;) which will take you to the output page. This html page contained a text output file that &quot;grew&quot; as each person registered to do a class. (Last class registered was always on top.)

Since I'm expecting 222 workshops, I need a reliable, easy way for the leaders to be able to leave their information for me and the form2file script which Concentric (my previous domain host) provided worked perfectly. Sure wish I could find a duplicate of it that I could run.

I will be checking with my new domain host, Ipowerweb, to see if they have a solution for my problem. They've been very helpful so far.

As I said, I tried, but I haven't been able to tailor the one provided (above) to work in my situation. I thought form2file.pl was pretty standard, so I didn't think it would be hard finding it, but I was wrong.

So I'm still looking.....

Sharon
 
The guy I asked at chem.duke.edu (Bill Day) said that they'd stopped using form2file and suggested an alternative. I didn't put it to you at the time because it looks like quite a project to implement. I'll dig out the details later and pass them to you. If it's this important to you (222 workshops) it might well be worth the effort.

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Have a look at
As I said, not trivial to implement but it will do the job you want and lots more.

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
I'll definitely try Mike's suggestion.

Yes, it definitely is a &quot;big deal&quot;. It's the world's largest hammered dulcimer event drawing about 10,000 folks from all over the world. I organize the workshops which are offered by the best folk musicians in the world (many national and world champions) who volunteer to instruct these classes (222 of them) over three days covering every instrument imaginable (from banjos to harps)! I compile the information the instructors provide into a 16-page program! Everything is done as a &quot;labor of love and devotion&quot;. The cost for folks to attend is $3 for the whole event including the program. No one (including me) gets paid. It's AWESOME!

Hopefully Mike's script will work. But I sure wish that guy from Duke still had form2file, since I'm really not familiar with perl/cgi. Nevertheless I'm determined!! I may have questions. If so, maybe some of you who &quot;do Perl&quot; can help.
 
From the documentation:

In order to get Mod_Survey to work, you will need a working apache installation with mod_perl installed and configured. Mod_perl will need perl installed. Apart from this, the program should be possible to run on any unixoid system

You'll need to start a conversation with your IPowerweb. It doesn't seem likely that they'll have mod_survey installed already so you will need to put a good case forward.

It may be that they have something else installed that will do the job -- I'd be talking to them right now.

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
I was asked to provide a status report.

I now have a working script!! Sunday I went to a website called I signed up as a webmaster and posted a &quot;job description&quot; to hire a programmer. There were three bids from folks willing to do my project. I was able to select from the three offers. Yesterday I contracted with &quot;Steve&quot; from Cast Web Design.

He knew his stuff. Last night I sent him the form, txt file, etc. which I'd used previously and this morning he'd reworked a form2file so that it do what I needed.

You can see how it works at
His price was unbelievably low. He said it was fun and easy. He seemed to enjoy contributing his talents to an event like ours.

I'm over-joyed!!

Sharon
 
excellent result :)

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top