Solved

saving txt files on a remote site

Posted on 2001-07-17
8
201 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
Comment Utility
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
Comment Utility
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
Comment Utility
another thing:

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

hamed
0
 
LVL 3

Expert Comment

by:rondi
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 21

Expert Comment

by:ziolko
Comment Utility
Sockects sugested... I'll sugest DCOM
ziolko.
0
 
LVL 30

Author Comment

by:third
Comment Utility
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
Comment Utility
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
Comment Utility
or see http://www.delphi-dolphin.com/tutorials.php?182
( copyright : bugroger - another expert )
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now