public function process($method, $src)
{
$src = preg_replace("/https?:\\/\\//", '', $src);
$tmpFile = tempnam($this->workingFolder, 'ips') . '.jpg';
$ok = copy($this->endpoint . "/{$method}/{$src}", $tmpFile);
if (!$ok || filesize($tmpFile) < 100) {
throw new BeatmapProcessorException("Error retrieving processed image: {$method}");
}
return $tmpFile;
}