Results 1 to 2 of 2

Thread: getting a pic

  1. #1
    Join Date
    Mar 2004

    getting a pic

    Ok, I did this in the past before, but I cant remember how. I know its something pretty simple but it just isnt coming to me at the moment.
    The question is, lets say there is a picture at
    in php, how can I get the script to download that picture and place it in somedirectory?

  2. #2
    Join Date
    Jul 2002
    Manchester, UK
    You should be able to use fopen to open the url of the image, fopen the destination file (i.e. the same filename in the directory you want it placed in), and then use fread and fwrite to read the data in from the file and write it out to the new file respectively.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts