rendered paste body<?php$num = '0';$num2reach = '900';while($num<$num2reach){ echo "\nThis is the $num time this script has run through the images.\n\n"; $num = $num + 1; //get the image ... $img = array( 'http://www.embamexcan.com/images/bandera_Mexico.jpg', 'http://portal.sre.gob.mx/atlanta/images/themes/atlanta/default_r2_c2.jpg', 'http://portal.sre.gob.mx/portland/images/themes/atlanta/default_r2_c2.jpg', 'http://portal.sre.gob.mx/con_sanfrancisco/images/themes/atlanta/default_r2_c2.jpg', 'http://portal.sre.gob.mx/denver/images/themes/theme_consulados/images/consulados_r1_c1.jpg', 'http://portal.sre.gob.mx/miami/images/themes/atlanta/default_r2_c2.jpg', 'http://portal.sre.gob.mx/atlanta/images/themes/atlanta/default_r2_c2.jpg', 'http://portal.sre.gob.mx/chicago/images/themes/atlanta/default_r2_c2.jpg', 'http://portal.sre.gob.mx/boston/images/themes/atlanta/default_r2_c2.jpg', 'http://portal.sre.gob.mx/detroit/images/themes/atlanta/default_r2_c2.jpg', 'http://www.consuladoomaha.org/images/ConOmahaSombra.gif', 'http://portal.sre.gob.mx/portland/images/themes/atlanta/default_r2_c2.jpg', 'http://www.pri.org.mx/estadetulado/images/gente.jpg', 'http://portal.sre.gob.mx/dallas/images/themes/atlanta/default_r2_c2.jpg', 'http://portal.sre.gob.mx/houston/images/themes/atlanta/default_r2_c2.jpg', 'http://www.sre.gob.mx/laredo/images/entradaei_r1_c1.jpg', 'http://portal.sre.gob.mx/sanantonio/images/themes/atlanta/default_r2_c2.jpg', 'http://portal.sre.gob.mx/vancouver/images/themes/default/default_r1_c1.jpg', 'http://www.embamexcan.com/images/bandera_Mexico.jpg', 'http://www.consulmex.com/images/home/top.gif', 'http://www.consulmex.qc.ca/escudo.gif', 'http://www.sre.gob.mx/images/fotos/inaug_fox.jpg'); foreach($img as $server){ $handle = fopen($server, "rb"); if ($handle==null){ echo "Error, could not connect to {$server}.\n"; }else{ $contents = ''; while(!feof($handle)) { $contents .= fread($handle, 2048); } if ($contents!==null){ echo "Script worked, {$server}.\n"; }else{ echo 'Script didn\'t work, no contents of '.$server.' were found.\n'; }; }; fclose($handle); }}?>