forked from umbrae/jsonlintdotcom
-
Notifications
You must be signed in to change notification settings - Fork 3
OpenSpaceLint Docs
slopjong edited this page Feb 18, 2013
·
3 revisions
// iterate over the directory and load all the JSONs
$directory = json_decode(file_get_contents("path/to/file"), true);
foreach($directory as $space => $url)
{
// try to fork the process to speed up the caching
if(function_exists("pcntl_fork"))
{
//trigger_error ( string $error_msg [, int $error_type = E_USER_NOTICE ] )
// fork the current process
switch($pid = pcntl_fork()){
case -1:
// @fail
die('could not fork');
break;
case 0:
// @child
cache($space, $url);
break;
default:
// @parent
pcntl_wait($status); //Protect against Zombie children
}
}
else
cache($space, $url);
}
Where to find lat and lon for a space?