Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8524717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:46:02+00:00 2026-06-11T07:46:02+00:00

I have a PHP file (feature on the site) – that allows User to

  • 0

I have a PHP file (feature on the site) – that allows User to import data from his account on another site.
I also need to copy LOTs of images from there every time he wants to import data.
E.g. 500 pics, 300-500Kb each is minumum. Expect this number easily to be 2000 images for one user.

The steps for each picture are:

  • Get the picture URL
  • Make image from URL (by using imagecreatefromjpeg and others)
  • Save it on my server (using functions like imagejpeg, imagepng etc)

It already takes VERY long to execute this code (over 8 mins).
I realize it’s lots of data, but is there another possible way to do it?
Maybe run copying on background, or copy many pics simultaneously.
Just want to know if there is any technology that is designed specially for this, and I don’t know about it.
Or there is no other way except to outsource work with images to some image hosting server and only keep thumbnails.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:46:04+00:00Added an answer on June 11, 2026 at 7:46 am

    There’s not a lot of information to go on here. What OS’s are being used? How “remote” is the source site? What format are the images already in?

    If the other site is remote (i.e., a different hosting company), the main problem you will have is the speed at which the source server can pipe the data down to your machine.

    One big question though is “what format are the images in at the moment?”. If the images are already JPEGs then retrieving and then converting into JPEG again will decrease the quality (albeit slightly). A better thing to do would be to just copy the image file directly. This will remove the time taken for your PHP app to re-encode a JPEG. Ask yourself – do you really need to convert the images?

    Depending on what OS commands you have available, you would probably be better off calling applications which handle the transfer (e.g. wget in Linux). I’ve used wget to retrieve files from a remote server to a local one and it’s not too difficult to get running.

    Remember – the more steps you have in your transfer, the longer it is going to take. At the moment, you have:

    • retrieval
    • conversion
    • writing

    all handled by PHP (probably going from slowest to quickest)

    Does the source host provide an archive or export facility for customers? If so, could that be utilised to transfer files en masse?

    Taking as much out of PHP as possible will make the process quicker. Calling system functions (e.g., wget, ftp, ssh, imagemagick etc) would make things quicker still (outside of PHP and Apache)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a new feature on my site that allow user to get vcard
I have a PHP file that contains a large array (about 90KB). I'm considering
I have a php file setup to pull through ONE XML data feed, What
I have a php file which checks for login and password from users database,
I have an XML file that needs parsing in PHP. I am currenlty using
I'm actually working on a PHP project that will feature a user system (Login,Register,Send
BBEdit has an excellent multi-file search feature that can search with Grep. I have
I have a PHP File with something like this: <script type=text/javascript> var page =
i have a php file which stores a variable, and i need to create
I have a PHP file with shell commands running through a screen, the commands

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.