$url1 = 'www.somewebsite.com/somefile.ext';
if (@copy($url1, "somefolder/filename.ext"))
{
echo 'File 1 saved.';
}
This code works well when I tried to copy a file without any login permissions. But when I tried to copy a file with login permission, the file is not get copied. Is there anyway to send login information too?
The usual way is to encode login info in the URL, before the server. For example:
Remember to think about security.