Re: [PHP-DB] Copying an image from one server to another

2008-02-05 Thread Chris
ioannes wrote: OK but I could execute the script on the target server, which is also mine. So the jpg on the source is actually the remote server, I would be reading a remote file and writing it to the server which is executing the script. OK I guess i completely misunderstood what you were

Re: [PHP-DB] Copying an image from one server to another

2008-02-05 Thread Daniel Brown
On Feb 5, 2008 2:57 PM, ioannes <[EMAIL PROTECTED]> wrote: > Am I right in thinking that exec() executes a string as a call to a > program which executes in a shell? So am I to write: > > $callthis="the contents of my rsynch file"; > exec($callthis); Filtered :-\ -- Daniel P. Brown Se

Re: [PHP-DB] Copying an image from one server to another

2008-02-05 Thread ioannes
Am I right in thinking that exec() executes a string as a call to a program which executes in a shell? So am I to write: $callthis="the contents of my rsynch file"; exec($callthis); ? John ioannes wrote: OK, so how would I hand over the list of files from php to the script? And am I right

Re: [PHP-DB] Copying an image from one server to another

2008-02-05 Thread ioannes
OK, so how would I hand over the list of files from php to the script? And am I right that I would write the rsynch code in a text file called anything.txt and the rsync at the start of the line is what calls up the rsynch program, unlike php where you need to call it something.php - though

RE: [PHP-DB] Copying an image from one server to another

2008-02-05 Thread Mr Webber
: Re: [PHP-DB] Copying an image from one server to another I am and have been reading http://samba.org/ftp/rsync/rsync.html, which is one web page but 44 real pages. I see that FILE is a term used the rsynch script. Is this something output from the php script, and if so how is it channelled

Re: [PHP-DB] Copying an image from one server to another

2008-02-05 Thread Daniel Brown
On Feb 5, 2008 9:49 AM, ioannes <[EMAIL PROTECTED]> wrote: > OK but I could execute the script on the target server, which is also > mine. So the jpg on the source is actually the remote server, I would > be reading a remote file and writing it to the server which is executing > the script. T

Re: [PHP-DB] Copying an image from one server to another

2008-02-05 Thread ioannes
rom the database and get those files into the new site. John | Mr Webber wrote: FILE is there reference from the man page. It contains the files to include in the sync. Have you read the man page for rsync? -Original Message----- From: ioannes [mailto:[EMAIL PROTECTED] Sent: Tuesday,

Re: [PHP-DB] Copying an image from one server to another

2008-02-05 Thread ioannes
OK but I could execute the script on the target server, which is also mine. So the jpg on the source is actually the remote server, I would be reading a remote file and writing it to the server which is executing the script. Chris wrote: ioannes wrote: This is too advanced for me and having

Re: [PHP-DB] Copying an image from one server to another

2008-02-05 Thread ioannes
m: ioannes [mailto:[EMAIL PROTECTED] Sent: Monday, February 04, 2008 12:59 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] Copying an image from one server to another Initially I could not find much on SCP and rsynch is about synchronising folders, but that is only part of the problem. I don't

Re: [PHP-DB] Copying an image from one server to another

2008-02-04 Thread Chris
ioannes wrote: This is too advanced for me and having spent several hours reading I am no wiser. Given that I understand cURL and uploading files is possible - http://us3.php.net/features.file-upload - it should be just a matter of referencing a .jpg using a URL into a variable and uploading i

Re: [PHP-DB] Copying an image from one server to another

2008-02-04 Thread ioannes
This is too advanced for me and having spent several hours reading I am no wiser. Given that I understand cURL and uploading files is possible - http://us3.php.net/features.file-upload - it should be just a matter of referencing a .jpg using a URL into a variable and uploading it to the target

Re: [PHP-DB] Copying an image from one server to another

2008-02-04 Thread Chris
Aleksandar Vojnovic wrote: How about sending the file via SCP? (it would be a much more safer to transfer files) SFTP will work nicely though I don't know if there's a native SCP type function in php. I know there is the pecl library but that's not going to be available in most places (but ag

RE: [PHP-DB] Copying an image from one server to another

2008-02-04 Thread Mr Webber
Subject: Re: [PHP-DB] Copying an image from one server to another Initially I could not find much on SCP and rsynch is about synchronising folders, but that is only part of the problem. I don't want files in the target location that are not referenced from the target database. I hold r

Re: [PHP-DB] Copying an image from one server to another

2008-02-04 Thread ioannes
Initially I could not find much on SCP and rsynch is about synchronising folders, but that is only part of the problem. I don't want files in the target location that are not referenced from the target database. I hold references like this img[]=pic1.jpg&img[]=pic2.jpg then I parse it out i

Re: [PHP-DB] Copying an image from one server to another

2008-02-04 Thread Daniel Brown
On Feb 4, 2008 11:03 AM, Daniel Brown <[EMAIL PROTECTED]> wrote: > On Feb 3, 2008 11:03 PM, Chris <[EMAIL PROTECTED]> wrote: > > FTP. > > > > There's no way fopen is going to be able to write to a remote url, > > that'd just be such a huge security issue it's not funny. > > I must've missed whe

Re: [PHP-DB] Copying an image from one server to another

2008-02-04 Thread Daniel Brown
On Feb 3, 2008 11:03 PM, Chris <[EMAIL PROTECTED]> wrote: > FTP. > > There's no way fopen is going to be able to write to a remote url, > that'd just be such a huge security issue it's not funny. I must've missed when the W3C and IETF forced a disable on POST. ;-P -- Daniel P. Brown Senio

Re: [PHP-DB] Copying an image from one server to another

2008-02-04 Thread Aleksandar Vojnovic
How about sending the file via SCP? (it would be a much more safer to transfer files) -Aleksander Chris wrote: ioannes wrote: I am trying to: - check whether an image file exists on a server, - check whether it does not exist on another server, and if not exists - to copy from the first loca

Re: [PHP-DB] Copying an image from one server to another

2008-02-03 Thread Chris
ioannes wrote: I am trying to: - check whether an image file exists on a server, - check whether it does not exist on another server, and if not exists - to copy from the first location to the second. I am using cURL. First step to capture the image from the first server. When I return this