write mismatch

apache runs on host A  and all the cgi code is on host A
(cgi code uses <input type=file> to get the file

when i run executethe url from host B, i give th epath of the file c:\test\test.txt of host B.
the cgi creates a file out.txt, but cgi writes this file on the server A and not on my host B from where I am running.
perlperlAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TintinCommented:
Looks like you are a little unclear on CGI, HTTP and web server technologies.

<input type=file>

is not CGI code, it is HTML.

If your CGI program/script runs on host A, the only way it can write a file on Host B is by using what ever appropriate protocol you have setup between the two hosts.  This maybe ssh, ftp, NFS, SMB, HTTP or any number of other protocols.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
perlperlAuthor Commented:
yes, i am new to cgi world....
Here is what I am looking.
I have host A, where Apache runs as web server......I have my website (all cgi scripts on host A)

now if the user hits the url http://www.hostname.com/cgi-bin/test.html  , the html  has browse button which asks user the filename.
test.html then gets redirected to http://www.hostname.com/cgi-bin/process.cgi   this creates a file called out.txt, problem it is saving the file in C: of host A.
I wwant to this file on the customers local desktop C:
What settings I need to do?
perlperlAuthor Commented:
how can my cgi running on Host A can save a copy of file i create on customers local desktop.......
perlperlAuthor Commented:
also, in test.html, user specifies the file c:\create.txt, but my cgi is looking for this file on host A C:\create.txt instead of using customers C:\create.txt

I am a bit confused
ahoffmannCommented:
> I wwant to this file on the customers local desktop C:
your process.cgi has to return the file with a HTTP-header like
  Content-Type: data/unknow
which forces the browser to open the download dialog

Assuming your process.cgi is perl, then that part looks like:

  use CGI;
  my $q=new CGI;
  $text="here is your text from the file out.txt";
  print $q->header(-type=>"data");
  ptint $text;
  exit( 0 );
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.