All pastes #727985 Raw Edit

Mine

public php v1 · immutable
·published 2007-10-06 16:10 UTC
rendered paste body
<?php$sockArray = array();$siteArray = array(	"Site1" => "www.test1.com/test.php",	"Site2" => "www.test2.com/test.php",	"Site3" => "www.test3.com/test.php",	"Site4" => "www.test4.com/test.php"	);$arrayLength = count($siteArray);for($j=0;$j<2;$j++){	for($i=0;$i<$arrayLength;$i++){		$sockArray[$i] = fsockopen($siteArray[$i], 80);		$out = "GET / HTTP/1.1\r\n"; 		$out .= "Host:" . $siteArray[$i] . "\r\n";		$out .= "Connection: Close\r\n\r\n";		if(!$sockArray[$i]){			print_r($siteArray[$i]. "...error starting");		}else{			print_r($siteArray[$i]. "...started";		}		fclose($sockArray[$i]);	}}?>