Re: [PHP] FTP alternative to copy() ?

2004-03-02 Thread raisinlove
Raditha Dissanayake wrote:
then use
`cp source destination`
In my php script? This must be executed automaticaly by the script.
I probably have no other choice than copy() then.
-s

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] FTP alternative to copy() ?

2004-03-02 Thread raisinlove
Raisinlove wrote:
Raditha Dissanayake wrote:
then use
`cp source destination` 
In my php script? This must be executed automaticaly by the script.
I probably have no other choice than copy() then.
-s
Ok, I found the solution! ftp_rename() was what I was looking for.
Funny no one mentioned it! I smaked my forhead for not having thought of 
it myself.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] FTP alternative to copy() ?

2004-03-01 Thread Richard Davey
Hello,

Monday, March 1, 2004, 2:24:39 PM, you wrote:

r Hi, I'd like to know if there's an alternative to copy() to copy a file
r from one directory to another, using the FTP functions?

r I figured I could probably open the file from the server and save/upload
r it to a specified path.

r Can this be done? What syntax should I use?

You can do this using FXP if both servers support it. However I don't
know if PHP has support for FXP built in or if the standard FTP
commands can handle it. Failing that you'll have to do as you
suggested and download the file to a temp location before uploading it
again.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FTP alternative to copy() ?

2004-03-01 Thread Raditha Dissanayake
Hi,

Are you trying to copy from the FTP to the web server or are you trying 
to pass it through to the end user? if you are on the same network other 
options include RCP (insecure) and SCP (secure) 

Richard Davey wrote:

r Hi, I'd like to know if there's an alternative to copy() to copy a file
r from one directory to another, using the FTP functions?
r I figured I could probably open the file from the server and save/upload
r it to a specified path.
r Can this be done? What syntax should I use?
 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] FTP alternative to copy() ?

2004-03-01 Thread raisinlove
Raditha Dissanayake wrote:
Hi,
Are you trying to copy from the FTP to the web server or are you trying 
to pass it through to the end user? if you are on the same network other 
options include RCP (insecure) and SCP (secure)
Actually, it's much simpler than that but it might be overkill.
My overall script is for creating directories on the same server, and 
I'd like to copy the main index file to each new directory that is 
created. So my intention is exactly the same as copy() since it's on the 
same server.
I'm exploring other alternatives because I cant see to get copy() 
working as I intend.

-s

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] FTP alternative to copy() ?

2004-03-01 Thread Raditha Dissanayake
then use
`cp source destination`
that should work.

raisinlove wrote:

Raditha Dissanayake wrote:

Hi,
Are you trying to copy from the FTP to the web server or are you 
trying to pass it through to the end user? if you are on the same 
network other options include RCP (insecure) and SCP (secure)


Actually, it's much simpler than that but it might be overkill.
My overall script is for creating directories on the same server, and 
I'd like to copy the main index file to each new directory that is 
created. So my intention is exactly the same as copy() since it's on 
the same server.
I'm exploring other alternatives because I cant see to get copy() 
working as I intend.

-s



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php