We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

smilylion on 09/09/06


Tagged

upload


Versions (?)


Who likes this?

6 people have marked this snippet as a favorite

meth
NexusRex
iNiels
oli964
skywalker
romanos


upload php from http://link


Published in: PHP 


  1. <?php
  2. $file = "http://absolute/name.jpg";
  3. $filename = basename($file);
  4. $uploadDir = '/domains/path-com/path/www_root/'.$filename;
  5. if (!copy($file, $uploadDir)) {
  6. print ("failed to copy $file...<br>\n");
  7. }
  8. ?>

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: smilylion on September 22, 2006

You need to login to post a comment.