Solved

saving txt files on a remote site

Posted on 2001-07-17
8
208 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
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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

821 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