[PHP] Copying a remote graphic to my server.

2002-09-29 Thread scott
Hello there I am trying to copy a remote graphic from http://blah.com/blah.jpg to my server. How would I achieve this in php I have looked on the archives but can't seem to find the best way. I am running 4.1.2 on apache unix. I understand copy will not work on remote files (tried it) but I am n

Re: [PHP] Copying a remote graphic to my server.

2002-09-29 Thread Rasmus Lerdorf
In PHP 4.3 you can actually just use copy(). In previous versions if you just want to dump it out you can use readfile(), or if you want to store it, use a simple fopen(), while(!feof()) fread() loop. -Rasmus On Sun, 29 Sep 2002, scott wrote: > > Hello there > I am trying to copy a remote grap

[PHP] Copying a remote graphic to my server.

2002-09-29 Thread scott
Hello there I am trying to copy a remote graphic from http://blah.com/blah.jpg to my server. How would I achieve this in php I have looked on the archives but can't seem to find the best way. I am running 4.1.2 on apache unix. I understand copy will not work on remote files (tried it) but I am n