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
Записки профессора » BPoster или собственный бот регистрации в соц закладках moemesto.ru
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 > BPoster или собственный бот регистрации в соц закладках moemesto.ru

BPoster или собственный бот регистрации в соц закладках moemesto.ru


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

Продолжая серию “собственный Бот автоматической регистрации в социальных закладках” представляю вам новый класс для регистрации в сервисе МоёМесто.

класс называется так же как и предыдущий Poster.

Может когда нибудь создам собственный сервис =)

class Poster
{
   private $username;
   private $password;

   private $url;
   private $title;
   private $tags;
   private $description;

   private $userAgent='User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Widows NT)';

  function moemesto()
  {

    $ch = curl_init();
    $post=array("login"=>$this->username,
          "password"=>$this->password,
          "store"=>1,
          "do_auth"=>"%E2%EE%E9%F2%E8");

     curl_setopt($ch, CURLOPT_URL, "http://moemesto.ru/my.php");
     curl_setopt($ch, CURLOPT_HEADER, 1);
     curl_setopt($ch, CURLOPT_USERAGENT, $this->userAgent);
     curl_setopt($ch, CURLOPT_TIMEOUT, 10);
     curl_setopt($ch, CURLOPT_COOKIEFILE, $_SERVER['DOCUMENT_ROOT'].'/cookie.txt');
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     curl_setopt($ch, CURLOPT_POST, 1);
     curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
     curl_setopt($ch, CURLOPT_REFERER, "http://moemesto.ru");

    $result = curl_exec($ch);


    $post=array("note"=>0,
          "url"=>$this->url,
          "title"=>$this->title,
          "desc"=>$this->description,
          "tags"=>$this->tags,
          "status"=>"ALL",
          "save"=>1,
          "do_post"=>"%C4%EE%E1%E0%E2%E8%F2%FC");

     curl_setopt($ch, CURLOPT_URL, "http://moemesto.ru/post.php");
     curl_setopt($ch, CURLOPT_HEADER, 1);
     curl_setopt($ch, CURLOPT_USERAGENT, $this->userAgent);
     curl_setopt($ch, CURLOPT_TIMEOUT, 10);
     curl_setopt($ch, CURLOPT_COOKIEFILE, $_SERVER['DOCUMENT_ROOT'].'/cookie.txt');
     curl_setopt($ch, CURLOPT_POST, 1);
     curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
     $result=curl_exec($ch);

    if(preg_match("#С вашего IP адреса [0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} поступило слишком много запросов#",$result))
      echo $result;
     
  }
}

 $post=new Poster();
 $post->username="bobpbI";
 $post->password="123123";
 $post->url="n-professor.ru";
 $post->title="Записки профессора";
 $post->tags="PHP, СЕО, SEO, JS, JavaScript, JQuery";
 $post->description="Блог начинающего программиста.Много полезной информации для
 новичков и огромный простор для критики от проффи."
;

$post->moemesto();

Если есть вопросы, спрашивайте, не стесняйтесь =)
Конструктивной критике тоже буду рад!

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

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

PHP , , ,

  1. Troy
    27 Июль 2009 из 16:05 | #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. 27 Июль 2009 из 19:08 | #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:53 | #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

    А плагин для WP есть?

  4. 31 Июль 2009 из 12:08 | #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

    @adw0rd
    Какой плагин? для чего?
    Для постинга в соц закладки автоматически? Навряд ли.

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