ok, sorry.i want to generate a script that will allow me to login and
edit an ftp from a page in my website. http to ftp
What the various replies here are trying to get at is this:
As a rule, people here are not interested in writing your script for
you. Sometimes if the problem is particularly interesting, or
particularly trivial, people might, but your problem is neither-- it
is of interest to only you, and consists of a lot of fairly tedious
sub-pieces that in general are not a lot of fun to do.
So since you're the one with the problem, it behooves you to make it
easy for other people to help you. In this case, it means breaking
down your problem into its component parts, writing some code on your
own, and when you have a problem, posting the smallest piece of
cut-and-pasteable code that exhibits only your problem.
In this case, your problem consists of (at least) these steps:
1) Get a CGI (or mod_perl, or fastCGI, or whatever) request
2) Fetch a file via ftp
3) Display it to the user
Then, when the user is done and clicks "submit",
4) Get another CGI (or whatever) request
5) Store the resulting data into a file via FTP
6) Notify the user that the operation succeeded (or didn't, if it failed)
Perl can help you with steps 1, 2, 4, and 5. Displaying information
to the user is as simple as printing out HTML.
For parsing CGI requests:
perldoc CGI
For fetching and storing a file via FTP:
perldoc Net::FTP
For printing out HTML to the user:
perldoc -f print
Just FYI, you will want to read the Posting Guidelines, which are
posted on this newsgroup regularly. They explain all the stuff I did
already, and give you information on how to ask questions that are
likely to be answered by smart people here. If you just ask us to
"please write my script for me", then we aren't likely to be
interested, but we're usually happy to help when you post code and
tell us, "It does this, but I want it to do that, and I don't know
why."
-=Eric