EarthLink.net   Start Page   Web Mail   Biz Center   Support  
 
     
Search  
................................................................................................................
Web Hosting Help | Control Panel  

File Exchange

A File Exchange area allows visitors of your Web Hosting Site to upload and download files from a specific area of your Web Hosting site. The File Exchange area's password tool also allows you to control who has access to the area.

Note: The File Exchange area is compatible with Netscape Navigator 2.0 and later or Microsoft Internet Explorer 4.0 and later.

See the MindSpring Web Help File Exchange Area for an example of the File Exchange area. The userid is guest and the password is web.


Creating a File Exchange Area

To Create a File Echange Area on your Web Hosting Account

  1. Using your web browser, log into the MindSpring Control Panel at https://control.business.mindspring.com/

  2. From the Toolbox menu, select File Exchange.

  3. You will be asked to confirm installation of the File Exchange area. If you do not have a FrontPage account then click Install.

  4. If the File Exchange area installs correctly you will see a success message. You can then choose to view the file exchange area or select a password to restrict access.

Once you have installed the File Exchange area on your site, you will have a directory under your www directory called incoming and a file in that directory called index.htm. This file can be downloaded via FTP and modified like any other HTML document.


Adding a Password

To Add a Password for your Incoming Directory, see our Password Protection Tool document


Customizing Your File Exchange Area

If you'd like to customize this script or install multiple File Exchange areas to your site, there are two ways of doing it.

To Use MindSpring's File Manger

  1. Change directory to cgi-bin

  2. Select the edit link for exchange.pl

  3. Make your alterations to the script

  4. Press the Change button when you're done. Make sure that the permissions for the file are

    Permissions
    Read Write Execute
    User R W X
    Group R X
    Global R X

Or Alternatively you can try this:

  • Copy the code below and paste it into your text editor.

  • After you've made your changes, upload the script

  • Change permissions to 755 (rwxr-xr-x).

  • This is the exchange.pl file:

    #!/usr/local/bin/perl5 alarm(600); # This script was created 6/10/96 # Tripp Cox # Webmaster - MindSpring Enterprises Inc # # Mutter, grumble, moan # # Modified to strip out PC and Macintosh file paths - 7/10/96 # # Modified - Stephen Hait - shait@mindspring, 9/8/96 # Change code to write and display uploaded files without paths # Minor change to BGCOLOR; changed fffff to ffffff # filedir="/u/web-user-id/www/incoming/"; fileurl="http://domain-name/incoming/"; use CGI; query = new CGI; print query->header; print query->start_html("File Upload Example"); print <<EOF; <BODY BGCOLOR="#ffffff"> <CENTER><H1>Public Exchange Area</H1></CENTER> <HR> <STRONG>Uploading only works with Netscape 2.0 and above</STRONG> <P> Select the <VAR>browse</VAR> button to choose a file to upload. EOF ; print query->start_multipart_form; print "<H3>Enter the file to upload</H3><BR>", query->filefield('filename','',45),"<BR> print query->reset,query->submit('submit','Upload'); print query->endform; opendir(DIR, "filedir"); # filedir from constant above local(@files) = readdir(DIR); # load @files array from readdir(DIR) for (@files) { if (/\\/) { oldfile = _; # store current element in oldfile @path = split (/\\/,oldfile); # store all path elements in @path array newfile = pop(@path); # store file name w/o path to newfile # rename old filename with path info to just plain filename rename("filedir"."oldfile","filedir"."newfile"); } next if (/^\./); # bypass listing for current dir "." next if (/^index/); # or file starting with "index" print "<A HREF = "."fileurl"."_".">_</A><P> } if (file = query->param('filename')) { print "<HR> newfile = file; if (/\\/, file) { oldfile = file; @path = split(/\\/, oldfile); newfile = pop(@path); } print "<A HREF = "."fileurl"."newfile"."><H2>newfile</H2></A> open(OUTFILE, ">filedir"."newfile"); while (<file>) { print OUTFILE "_"; } close OUTFILE; } print <<EOF; <HR> </BODY> EOF ; print query->end_html;

    Note: If for some reason you want to remove and reinstall the File Eexchange Area, you will need to remove the incoming directory from your www folder, and the exchange. pl file from your CGI-BIN folder. Please make back-up copies of these items before deleting them. When you delete the incoming folder, any files stored in the incoming folder will be lost.

    Members and visitors to the EarthLink website agree to abide by our Member Policies.
    EarthLink Privacy Policy
    © 2002 EarthLink, Inc.