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 8121515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:30:55+00:00 2026-06-06T05:30:55+00:00

I am working to download images from a website and there comes an error

  • 0

I am working to download images from a website and there comes an error saying "Maximum execution time of 30 seconds exceeded" and the downloading of images stopped. And I tried to add the following line of code that I thought could solve the problem:

ini_set('max_execution_time', 0); //zero means forever I think, I also tried 200 or 300 seconds

And it didn’t give me errors BUT the execution stopped (I mean the images stop downloading).

How can I make the execution time extend like 300 seconds? Is there any solution for this?

Thanks in advance!

Edit:

function save_image($inPath,$outPath)
    { 
$in=    fopen($inPath, "rb");
$out=   fopen($outPath, "wb");
while ($chunk = fread($in,8192))
{
    fwrite($out, $chunk, 8192);
}
fclose($in);
fclose($out);
    }

And a method call:

foreach($li->find('a[class=thumbnail]') as $img) 
                    {
                        foreach($img->find('img') as $e)
                        {   
                            $image++;           
                           echo "<img src=\"" . $e->src . "\"/>" . "<br>";
                           save_image($e->src, 'thumbs/image'. $image .'.JPG');

                        }

                    }   

That is the code that I’m using

  • 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-06T05:30:56+00:00Added an answer on June 6, 2026 at 5:30 am

    Alternatively, you could change the max_execution_time in your php.ini file so that it matches what you need.

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

Sidebar

Related Questions

I am working on a app where I would like to download images from
I want to download all files (html, images, js, css) from one website. I
Basically I'm trying to download images from a website using the following command (SwiftIRC
I'm working on a script to download the images from mangareader, and I've been
I am working on an app where I need to download lots of images
I'm working on a web application that has a lot to download (javascript, images,
I am working on a streaming download (CSV) from Rails 3.2 and am coming
I'm working on a console application that tries to download some files from a
I m working on a console application that tries to download some files from
I am working on a project where we have to download videos from DVR

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.