Re: transfering a file from one host to another
| From: | (R. Visser) | Date: | Tue, 23 Apr 2002 19:00:37 +0000 |
| Subject: | Re: transfering a file from one host to another | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94237@lists.php.net to get a copy of this message | ||
Yes there is,
you can use fopen() with ftp username and password like this:
fopen("ftp://username:password@ftp.yourdomain.com/path/to/yourfile",
"w");
Using this you also can open files on a HTTP server with Basic
Authentication, code will be then:
fopen("http://username:password@ftp.yourdomain.com/path/to/yourfile",
"w");
Yours,
René Visser
dleather@fineline.ca wrote:
> Is there a way to create a file to a remote host.
> IE: I have a php script on www.somedomain.com for example - and I want to
> fill out a form on this php script and make it create a file called
> "index.html" on say www.someotherdomain.com for example.
> I have admin and root access to BOTH domains.
> Is there a way I can popen or fopen a file using ftp username and password?
> The end result - I want to create index pages on the fly by filling out a
> form - which will in return create the page for my other web sites.
> So far, I have successfully created the index page. But to get it to the
> other site I am manually downloading the index page to my local computer,
> and uploading it to its new site - Not the most effective way to do things.
> Any ideas???
> Thanks in advance
> Dave