Copying Image Files From A Different Server To The Current Server

Hi All,

I am very new to Yii. So please bear with me.

I have a requirement to move image files from a different server to an existing one so that I can use the resources within the framework every X minutes.

I dont have the slightest clue on how we can achieve there.

Any help would be much appreciated.

Thanks.

:)

Hmm. Not quite clear for me.

You can possibly use some php functions


$remote = 'http://example.com/image.jpg';

$local = '/some/path/to/storage/image.jpg';


if (copy($remote, $local)) {

    // success

} else {

    // error

}

What’s the problem exactly?