src/Gregwar/Captcha/ImageFileHandler.php
public function saveAsFile($contents)
    {
        $this->createFolderIfMissing();

        $filename = md5(uniqid()) . '.jpg';
        $filePath = $this->webPath . '/' . $this->imageFolder . '/' . $filename;
        imagejpeg($contents, $filePath, 15);

        return '/' . $this->imageFolder . '/' . $filename;
    }
public function saveAsFile($contents)
    {
        $this->createFolderIfMissing();

        $filename = md5(uniqid()) . '.jpg';
        $filePath = $this->webPath . '/' . $this->imageFolder . '/' . $filename;
        imagejpeg($contents, $filePath, 15);

        return '/' . $this->imageFolder . '/' . $filename;
    }
public function saveAsFile ( $ contents ) { $ this -> createFolderIfMissing ( ) ; $ filename = md5 ( uniqid ( ) ) . '.jpg' ; $ filePath = $ this -> webPath . '/' . $ this -> imageFolder . '/' . $ filename ; imagejpeg ( $ contents , $ filePath , 15 ) ; return '/' . $ this -> imageFolder . '/' . $ filename ; }
Saves the provided image content as a file

@param string $contents

@return string
Saves the provided image content as a file