note 107872 added to function.copy
| From: | kashif dot rehman dot arain at gmail dot com | Date: | Mon, 12 Mar 2012 10:10:47 +0000 |
| Subject: | note 107872 added to function.copy | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186606@lists.php.net to get a copy of this message | ||
<?php
$from ='http://someserver.com/somefile.zip';
$to='./somefile.zip';
i
f(!@copy($from,$to))
{
$errors= error_get_last();
echo "COPY ERROR: ".$errors['type'];
echo "<br />\n".$errors['message'];
} else {
echo "File copied from remote!";
}
what if we don't know the file name and extension?
eg
$from ='http://someserver.com/download.php?id=123';
$to= ???
?>
----
Server IP: 69.147.83.197
Probable Submitter: 203.130.12.226
----
Manual Page -- http://www.php.net/manual/en/function.copy.php
Edit -- https://master.php.net/note/edit/107872
Del: integrated -- https://master.php.net/note/delete/107872/integrated
Del: useless -- https://master.php.net/note/delete/107872/useless
Del: bad code -- https://master.php.net/note/delete/107872/bad+code
Del: spam -- https://master.php.net/note/delete/107872/spam
Del: non-english -- https://master.php.net/note/delete/107872/non-english
Del: in docs -- https://master.php.net/note/delete/107872/in+docs
Del: other reasons-- https://master.php.net/note/delete/107872
Reject -- https://master.php.net/note/reject/107872
Search -- https://master.php.net/manage/user-notes.php