Jump to content
php.lv forumi

Meiteņu ievācējs


Pentiums

Recommended Posts

for($i = 1720; $i < 3987; $i++) {
file_put_contents('meichas/'.$i.'.jpg', file_get_contents('http://www.gign.lv/upload/pictures/large/image_'.$i.'.jpg'));
}

Link to comment
Share on other sites

hehe, thats true ^^

 

es savukārt aplauzos uz to, ka gribēju vnk outputot, bet firefox uz tām lielajām bildēm sāka raustīties. sapratu, ka labāk vairāk par 10-20 vnlaicīgi tam nevajag likt rādīt :D

for ($i = 1720; $i < 1730; $i++) echo '<img src="http://www.gign.lv/upload/pictures/large/image_' . $i . '.jpg" style="width: 400px" /><br />';

Edited by 2easy
Link to comment
Share on other sites

Tā kā kopējais bilžu failu skaits būs 2267, tad koda veiksmīgai pabeigšanai nepieciešams pievienot pirms cikla sekojošu rindiņu:

ini_set("max_execution_time", "1800");

 

c'mon, tas tak no konsoles jālaiž, priekš kam tur vispār pārlūku/webserveri mocīt? :)

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...