Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

saving txt files on a remote site

Posted on 2001-07-17
8
Medium Priority
?
216 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 300 total points
ID: 6297759
or see http://www.delphi-dolphin.com/tutorials.php?182 
( copyright : bugroger - another expert )
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

705 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