note 107872 deleted from function.copy by danbrown

From: Date: Thu, 10 May 2012 18:14:12 +0000
Subject: note 107872 deleted from function.copy by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187740@lists.php.net to get a copy of this message
Note Submitter: kashif dot rehman dot arain at gmail dot com ---- <?php $from =\\'http://example.com/somefile.zip\\'; $to=\\'./somefile.zip\\'; if (!@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://example.com/download.php?id=123\\'; $to= ???

« previous php.notes (#187740) next »