original_string: public static function fromUrl($url, $width, $height = 0)
      {
  
          $extension = pathinfo(strtok($url, '?'), PATHINFO_EXTENSION);
  
          $filename = sprintf('%s/thumb_%s.%s', sys_get_temp_dir(), md5($url), $extension);
  
          if (! file_exists($filename) && ! @copy($url, $filename, static::getStreamContextOptions())) {
  
              return static::$config['fallback'];
          }
  
          $urlizer = new Urlizer();
  
          static::configureUrlizer($urlizer);
          
          $thumb = new static($filename, $width, $height);
  
          $basename = $thumb->generateBasename();
  
          $filename = $urlizer->buildThumbFilename($basename);
  
          $thumb->getCache($filename);
  
          return $urlizer->buildThumbUrl($basename);
      }
code: public static function fromUrl($url, $width, $height = 0)
      {
  
          $extension = pathinfo(strtok($url, '?'), PATHINFO_EXTENSION);
  
          $filename = sprintf('%s/thumb_%s.%s', sys_get_temp_dir(), md5($url), $extension);
  
          if (! file_exists($filename) && ! @copy($url, $filename, static::getStreamContextOptions())) {
  
              return static::$config['fallback'];
          }
  
          $urlizer = new Urlizer();
  
          static::configureUrlizer($urlizer);
          
          $thumb = new static($filename, $width, $height);
  
          $basename = $thumb->generateBasename();
  
          $filename = $urlizer->buildThumbFilename($basename);
  
          $thumb->getCache($filename);
  
          return $urlizer->buildThumbUrl($basename);
      }
code_tokens: public static function fromUrl ( $ url , $ width , $ height = 0 ) { $ extension = pathinfo ( strtok ( $ url , '?' ) , PATHINFO_EXTENSION ) ; $ filename = sprintf ( '%s/thumb_%s.%s' , sys_get_temp_dir ( ) , md5 ( $ url ) , $ extension ) ; if ( ! file_exists ( $ filename ) && ! @ copy ( $ url , $ filename , static :: getStreamContextOptions ( ) ) ) { return static :: $ config [ 'fallback' ] ; } $ urlizer = new Urlizer ( ) ; static :: configureUrlizer ( $ urlizer ) ; $ thumb = new static ( $ filename , $ width , $ height ) ; $ basename = $ thumb -> generateBasename ( ) ; $ filename = $ urlizer -> buildThumbFilename ( $ basename ) ; $ thumb -> getCache ( $ filename ) ; return $ urlizer -> buildThumbUrl ( $ basename ) ; }
docstring: Get copy from external file url for make thumb
  @param string $url
  @param float $width
  @param float $height
docstring_tokens: Get copy from external file url for make thumb