As far as hecking to see if a file exists on your site. You can open a dir and check. I usually use the dir object and read through the filenames in it.
scorpion
4:37 pm on Mar 9, 2003 (gmt 0)
I see, so you can only "put" a file to an ftp resource? So my script is at say www.mysite.com/script.php, I want to write the file to mysite.com/afile.txt...
[edited by: jatar_k at 4:43 pm (utc) on Mar. 9, 2003] [edit reason] delinked [/edit]
jatar_k
4:46 pm on Mar 9, 2003 (gmt 0)
The script on your site can go out and grab anything it likes and then save it with in its own directory structure. It opens the file on some server, reads it into a var and then writes it to the machine it lives on.
You aren't trying to put it onto another server so it should work just fine.
scorpion
6:00 pm on Mar 9, 2003 (gmt 0)
thanks, I can see this working for text files, but would it also work to save a graphic file off the web onto your local server?
dhdweb
6:20 pm on Mar 9, 2003 (gmt 0)
Yes it would, but be careful, you are getting into copyright issues by taking other peoples graphics!
dhdweb
nosanity
7:01 am on Mar 11, 2003 (gmt 0)
Also, beware of how you handle the contents of the image. If you accidently have everything escaped, your image will just get broken. Just something to try to remember when playing around with it.