Hello everyone,
I am creating a video managing script.
I have a thumb for every video, and I am storing a link of it in mysql.
I would like to store those pictures on my server.
Is it possible to copy a file (public accessible, like this one http://chipchick.com/wp-content/uploads ... 28x350.gif) to some folder on my server with php, with only having a link to it ?
copy files
Moderator: General Moderators
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: copy files
Why?eastsideyahh wrote:I have a thumb for every video, and I am storing a link of it in mysql.
I would like to store those pictures on my server.
Technically, it's very straightforward. But just because an image is public accessible doesn't mean you have the rights to copy it to your servereastsideyahh wrote:Is it possible to copy a file (public accessible, like this one http://chipchick.com/wp-content/uploads ... 28x350.gif) to some folder on my server with php, with only having a link to it ?
-
eastsideyahh
- Forum Newbie
- Posts: 4
- Joined: Wed Nov 04, 2009 5:48 am
Re: copy files
To be able to change the size of it and reduce the loading time.Mark Baker wrote: Why?
The plan is, when user adds video, he finds some picture on the internet, and copy a link of it. Then, that picture should be renamed, resized and saved to a specific folder on the local server. Is it possible and how ? I can do resizing and renaming, the problem is in taking a file and saving it.
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: copy files
start with file_get_contents(), but pay heed to my comments about copyright of images.