function seconds ($time){
$days = preg_match('/([\d])*d/', $time, $matches);
$days= ($matches[1])*86400;
$hours = preg_match('/([\d])*h/', $time, $matches);
$hours = ($matches[1])*3600;
$minutes = preg_match('/([\d])*m/', $time, $matches);
$minutes = ($matches[1])*60;
$secundes = preg_match('/([\d])*s/', $time, $matches);
$secundes = ($matches[1]);
$seconds = $days + $hours + $minutes + $secundes;
return $seconds;
}