Strict Standards: Only variables should be passed by reference in /home/olegadmin/n-professor.ru/docs/wp-includes/pomo/mo.php on line 184

Strict Standards: Only variables should be passed by reference in /home/olegadmin/n-professor.ru/docs/wp-includes/pomo/mo.php on line 184

Deprecated: Non-static method WP_MatchesMapRegex::apply() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-includes/class-wp.php on line 207
Записки профессора » Создаем скриншот сайта по средствам PHP
Strict Standards: Only variables should be passed by reference in /home/olegadmin/n-professor.ru/docs/wp-includes/general-template.php on line 1643

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::LoadStyles() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 405
Главная > PHP > Создаем скриншот сайта по средствам PHP

Создаем скриншот сайта по средствам PHP


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

Deprecated: Non-static method CodeColorerOptions::ParseOptions() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 80

Deprecated: Non-static method CodeColorerOptions::PopulateDefaultValues() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 66

Deprecated: Non-static method CodeColorerOptions::FilterLanguage() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 102

Deprecated: Non-static method CodeColorerOptions::GetLanguageMappings() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 246

Deprecated: Non-static method CodeColorerOptions::ParseBoolean() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 157

Deprecated: Non-static method CodeColorerOptions::ParseBoolean() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 173

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 69

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 72

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 75

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 78

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 81

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 84

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-options.php on line 87

Strict Standards: Only variables should be passed by reference in /home/olegadmin/n-professor.ru/docs/wp-includes/pomo/mo.php on line 184

Strict Standards: Only variables should be passed by reference in /home/olegadmin/n-professor.ru/docs/wp-includes/pomo/mo.php on line 184

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/thumbnail-viewer/wp-thumbnailviewer.php on line 78

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

photoСегодня я расскажу как сделать скриншот сайта через сервис www.browsrcamp.com.
Почему я выбрал этот сервис, спросите вы. У него же есть огромный минус! Разрешено всего 25 запросов с одного IP в день.
Если требуется создание скриншотов сайта в большем количестве, то можно подключить а работу прокси сервера. Хотя здесь я их не буду задействовать, потому что 25 запросов в день мне вполне хватает.
Для чего нужны эти картинки?
Ну, можно использовать в разделе портфолио на своем сайте.
Добавляете вновь созданный сайт в портфолио, и рядышком автоматически скин этого сайта. Разве не замечательно? =)
И так, вот мой php скрипт для создания скриншота сайта :

class Site_screen_shots
{
  private $width;
  private $quality=1;
  private $qualityList=array("1"=>"png","2"=>"jpg","3"=>"jpg","4"=>"jpg");
  private $url;
  var $nameImg=NULL;
  var $dir=NULL;

  function width($width=800)
  {
    $widthArray=array("800", "832", "1024", "1280", "1600");
    if(in_array($width,$widthArray))
    {
      $this->width=$width;
    }
    else
    {
      $this->width=800;
    }
  }

  function quality($quality=1)
  {
    $quality=(int)$quality;
    if($quality>0&&$quality<5)
    {
      $this->quality=$quality;
    }
    else
    {
      $this->quality=1;
    }
  }


  function __construct($url=NULL)
  {
    if($url==NULL)
    throw new Exception("Вы не ввели url");

    $this->url=preg_match("#^http://.*#i",$url)?$url:"http://{$url}";
  }
  /**
   * создает скриншет, сохраняет его в указанную папку и возвращает ссылку на картинку
   * @return url
   */

  function screen_shots()
  {
   
    /* получаем страницу */
    $c=curl_init("http://www.browsrcamp.com/");
    curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
    $result=curl_exec($c);
   
    /* находим все формы на странице */
    preg_match_all('#<input(.*?)>#is', $result, $matches);
    foreach($matches[1] as $input)
    {
      preg_match('#name=\"([^\"]+)\"#is', $input, $name);
      preg_match('#value=\"([^\"]+)\"#is', $input, $value);
      $post[$name[1]]=$value[1];
    }

/* ну думаю понятно что мы тут делаем */
    $post["url"]=$this->url;
    $post["width"]=$this->width;
    $post["quality"]=$this->quality;

    /* отправляем запрос */
    $c=curl_init("http://www.browsrcamp.com/");
    curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($c, CURLOPT_POST, 1);
    curl_setopt($c, CURLOPT_POSTFIELDS, $post);
    if(!$page=curl_exec($c))
    throw new Exception("Ошибка: BrowsrCamp был не в состоянии обрабатывать ваш запрос.");
    curl_close($c);

    if(strpos($page,"Error: BrowsrCamp wasn't able to handle your request."))
    throw new Exception("Ошибка: BrowsrCamp был не в состоянии обрабатывать ваш запрос.");

    /* вытаскиваем ссылку на картинку */
    $page=substr($page,strpos($page,"Click the image for the fullsize version."));
    $page=substr($page,strpos($page,"<a"));
    $page=substr($page,0,strpos($page,"</div>"));
    $page=substr($page,strpos($page,"http"));
    $page=substr($page,0,strpos($page,"\""));

    /* сохраняем картинку в нужную директорию */
    if($this->dir!=NULL)
    {
      if(!$img=file_get_contents($page))
      throw new Exception("Не удалось получить картинку.");

      if($this->nameImg==NULL)
      {
        $this->nameImg=str_replace("http://","",$this->url);
      }

      $urlImg=$this->dir."/".$this->nameImg.".".$this->qualityList[$this->quality];
      if(!file_put_contents($urlImg,$img))
      throw new Exception("Не удалось сохранить картинку на сервер :\"".$this->dir."/".$this->nameImg.".".$this->qualityList[$this->quality]."\" .");

      return $urlImg;
    }
    else
    {
      return $page;
    }
  }
}


$screenShots = new Site_screen_shots("n-professor.ru");
$screenShots->dir="screen";
$screenShots->quality(2);
$screenShots->width(1600);
echo $screenShots->screen_shots();

Размер возвращаемого изображения может быть 800, 832, 1024, 1280, 1600. А расширение PNG, High JPG, JPG и Low JPG. Скрипт был написан довольно давно. Вот только руки дошли его в класс запихать и до ума довести.

Ну давайте по старой схеме =)
Есть вопросы? Задавайте.
Есть критика? Чтож, тоже валяйте=)

Поделиться в соц. сетях

Опубликовать в Google Buzz
Опубликовать в Google Plus
Опубликовать в LiveJournal
Опубликовать в Мой Мир
Опубликовать в Одноклассники
Опубликовать в Яндекс

PHP , ,

  1. Sinkler
    31 Июль 2009 из 0:39 | #1

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    Круто =)

  2. 31 Июль 2009 из 4:32 | #2

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    хуйня

  3. 31 Июль 2009 из 9:33 | #3

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    Код не смотрел, но добавлю в избранное статью, авось пригодится ;)

  4. 31 Июль 2009 из 12:05 | #4

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    @phpdude
    Как всегда в своем репертуаре =)

  5. 31 Июль 2009 из 19:38 | #5

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    Старая тема :)

  6. 11 Сен 2009 из 11:57 | #6

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    А где же демка, как положено?

  7. 11 Сен 2009 из 12:25 | #7

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    Хм.. Хорошо, прикручу =)

  8. просто я
    24 Фев 2010 из 20:36 | #8

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    зрзвгву прав…

    что вот это за феерический пиздец ?

    $page=substr($page,strpos($page,”Click the image for the fullsize version.”));
    $page=substr($page,strpos($page,”<a"));
    $page=substr($page,0,strpos($page,"”));
    $page=substr($page,strpos($page,”http”));
    $page=substr($page,0,strpos($page,”\”"));

    регулярку задействовать не судьба ? Не стыдно ТАКОЕ выкладывать ?

  9. 24 Фев 2010 из 23:48 | #9

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    Нет, не стыдно =)
    Для того и выкладываю что бы критиковали =)
    Регуляркой конечно красивей будет.

  10. 24 Фев 2010 из 23:51 | #10

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    я чет действительно не помню как мне такое в голову пришло =)Видимо было лето и было жарко =)

  11. ассассин
    02 Май 2012 из 2:07 | #11

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    а смысл так парится?????
    есть специальные сервисы
    http://www.s-shot.ru/
    http://www.thumbshots.ru/
    в них можно делать скриншоты без ограничений!

  12. 17 Ноя 2012 из 23:42 | #12

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    хорошая статья, только заголовок смутил. получается, что на чистом рнр нельзя делать скрины?

  13. cent
    26 Авг 2013 из 21:28 | #13

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

    такое чувство что класс здесь создан лишь для того, чтобы создать класс..выглядит дико

    • 26 Авг 2013 из 21:31 | #14

      Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

      Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 214

      Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 49

      Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

      Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-includes/plugin.php on line 170

      Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/olegadmin/n-professor.ru/docs/wp-content/plugins/codecolorer/codecolorer.php on line 222

      Так и есть. Это был далекий 2009 год. Я тогда смутно понимал для чего нужны классы =) и ООП вообще.

  1. Трекбеков пока нет.