Jump to content

What is the most efficient way to copy image from external site


Recommended Posts

Hi, I am attempting to write a script which downloads a copy of specified auction listings from a well know auction site.  It downloads a copy of the html page and associated images using the item number of the listing.  Although the code which I am using works, it is slow as it has to recreate the images once they are downloaded.  Also I have noticed that the images once recreated appear to be slightly larger than the original ones on the auction site.  I tried to use CURL but I think that the auction site have disabled this functionality on their server as all I kept getting was a message saying that the file had moved to another location although the underlying link I was using was correct.

 

Here is my code:

  $im = @imagecreatefromjpeg($imageurl);
  imagejpeg($im,$filename);

 

Any suggestions would be much appreciated.

 

thanks, Steve (Blackpool, UK)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.