PDA

View Full Version : Tough question! How to read/write a file on a website!



Jeremy G
12-07-2001, 06:41 PM
Assuming you know the FTP info (username/password) how can you access and write to a text file on your server??

Dissata
12-07-2001, 09:08 PM
technicaly you should be able to! in fact you could even if you didn't have a user/password, they call it hacking!

DeViLs_SouL
12-07-2001, 11:12 PM
select like:view file, or something... write, then save changes -> ur done....yes

Jeremy G
12-07-2001, 11:26 PM
I ment from a dos exe ..
not from an actual ftp program. geese.

Prelude
12-09-2001, 01:23 PM
This can be done, but probably not the way you're thinking. You write a cgi program that does whatever you want it to and then it writes to a text file on the server. That program could also take the data and turn it into a web page if you so wished. But if you want a program on your hard drive to do this then you're pretty much out of luck unless you know how to program with sockets.

-Prelude

Fahrenheit
12-12-2001, 08:54 PM
Originally posted by dbgt goten
I ment from a dos exe ..
not from an actual ftp program. geese.

If your thinking you can just connect and then use fopen() and all that stuff, hackers would have already taken over the world by now...

Jeremy G
12-12-2001, 08:58 PM
I dont want to connect and use fopen.. I want to ftp to my web site and write to files. I know the routines to do it with windows, but i NEED to do it with dos, for my dos game. I really didnt want to port to directx but looks like ill have to.

Fahrenheit
12-12-2001, 09:02 PM
Originally posted by dbgt goten
I dont want to connect and use fopen.. I want to ftp to my web site and write to files. I know the routines to do it with windows, but i NEED to do it with dos, for my dos game. I really didnt want to port to directx but looks like ill have to.

then use sockets, sockets arent just for windows you know. Try using fcntl.