Solved

saving txt files on a remote site

Posted on 2001-07-17
8
213 Views
Last Modified: 2011-09-20
is there a way to create, save and append files on a remote site. say, my (delphi)program is here and i constantly modify (i.e. append) a file located at www.blahblah.com. any suggestion will be appreciated. thanks in advance....
0
Comment
Question by:third
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 21

Expert Comment

by:ziolko
ID: 6292320
You can use FTP or write little program (name it "client")that will reside on WWW server and will kepp connection with Your app (call it "server") and just pass files or anything You want between "client" and "server".
ziolko.
0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6292798
dear third

i didnt work with FTP but i used  TClientSocket & TServerSocket and ClientSocket.Socket.SendText(SendedMsg); for communicate betwin Clients & Server.

ur code can be:

in SendedText u send a coded text : a Char in begin like 'A','R' for Append and rewrite after that FileName by a ',' at the end and then text that u want to add to file.

in server u can Decode it and ur program do the wanted work.

it is not exact way & a littile mizture to do and maybe FTP is better but it works.

best regards
hamed
0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6292810
another thing:

see chat Demo in standards Delphi Demo.it can be so usefull for using TClientSocket & TServerSocket.

hamed
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:rondi
ID: 6293086
Hi 3rd,

You're obviously gonna have to have access to the server,
so you can write server-side code that'll listen for data
and do the file I/O operations. I wouldn't recommend using
TServerSocket coz you'll probably encounter problems with
Proxies and stuff, so I think you'd be better off sticking
to the HTTP framework.

You can do this in a several ways:
1. Write an ASP page that'll accept Form posts
   from your client app. The ASP will use the
   "Scripting.FileSystemObject" COM object to the text file
   operations.

2. Write a CGI script to do the above. The I/O is a little
   more cumbersome, though.

3. (ideal) Write a Delphi CGI EXE or ISAPI DLL to do all
   this. This'll depend on whether the Webmaster will let
   you run EXEs/DLLs (assuming IIS)

HTH,
rondi
0
 
LVL 21

Expert Comment

by:ziolko
ID: 6296926
Sockects sugested... I'll sugest DCOM
ziolko.
0
 
LVL 30

Author Comment

by:third
ID: 6297728
can someone show code samples or links. my project needs real time update to those files. tnx...
0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6297751
dear third,

as i said Chat Demo in Delphi ( in Folder : Demo\Internet\Chat ) maybe Can help just u must set RemoteAddress to a Valid Address.

best regards
hamed

0
 
LVL 1

Accepted Solution

by:
h_mohsenian earned 100 total points
ID: 6297759
or see http://www.delphi-dolphin.com/tutorials.php?182 
( copyright : bugroger - another expert )
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question