Solved

saving txt files on a remote site

Posted on 2001-07-17
8
206 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 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