function ShareBoxPost()
{
// linkpreview
$this-> Gen_reqid();
$headers = $this->set_headers();
//$headers[] = "Expect: ";
$curl_data['headers'] = $headers;
#$curl_data['referer'] = "";
$curl_data['echo_header'] = true;
$curl_data['followlocation'] = true;
$headers[] = "application/x-www-form-urlencoded;charset=utf-8";
$curl_data['headers'] = $headers;
$p = array(
"at" => $this-> atToken,
"susp" => true,
);
$curl_data['post'] = http_build_query($p);
$curl_data['url'] = 'https://plusone.google.com/_/sharebox/linkpreview/?c='.urlencode($this-> url_spam).'&t=1&slpf=1&ml=1&_reqid='.$this-> _reqid.'&rt=j';
$this->code = $this->curl($curl_data);
write_string("logs/".$this->host."_plus_google_sharebox_linkpreview.html", $this->code);
preg_match_all ('~\[(.*),(.*),"(.*)"\]~', $this->code, $m);
$thumb_url = $m[3][0];
$thumb_info = getimagesize($thumb_url );
$t = parse_url ($this->url_spam);
$url_spam_host = $t['host'];
$oz =str_replace(':'.$this->userID, '', $this-> atToken);
$t = time();
$p = array(
'at' => $this-> atToken,
//'source' => 'widget',
'spar' => '["","oz:'.$this-> userID.'.'.$t.'.0",null,null,null,null,"[\"[null,null,null,\\\\\"'.$this->post_title.'\\\\\",null,null,null,null,null,[],null,null,null,null,null,null,null,null,null,null,null,\\\\\"'.$this->post_title.'\\\\\",null,null,[null,\\\\\"'.$this->url_spam.'\\\\\",null,\\\\\"text/html\\\\\",\\\\\"document\\\\\"],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[null,\\\\\"//s2.googleusercontent.com/s2/favicons?domain\u003d'.$url_spam_host.'\\\\\",null,null],[null,\\\\\"//s2.googleusercontent.com/s2/favicons?domain\u003d'.$url_spam_host.'\\\\\",null,null]],null,null,null,null,null,[[null,\\\\\"\\\\\",\\\\\"http://google.com/profiles/media/provider\\\\\",\\\\\"\\\\\"]]]\",\"[null,null,null,null,null,[null,\\\\\"'.$thumb_url.'\\\\\"],null,null,null,[],null,null,null,null,null,null,null,null,null,null,null,null,null,null,[null,\\\\\"'.$this->url_spam.'\\\\\",null,\\\\\"image/jpeg\\\\\",\\\\\"photo\\\\\",null,null,null,null,null,null,null,'.$thumb_info[0].','.$thumb_info[1].'],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[null,\\\\\"'.$thumb_url.'\\\\\",null,null],[null,\\\\\"'.$thumb_url.'\\\\\",null,null]],null,null,null,null,null,[[null,\\\\\"images\\\\\",\\\\\"http://google.com/profiles/media/provider\\\\\",\\\\\"\\\\\"]]]\"]",null,"{\"aclEntries\":[{\"scope\":{\"scopeType\":\"anyone\",\"name\":\"Anyone\",\"id\":\"anyone\",\"me\":true,\"requiresKey\":false},\"role\":20},{\"scope\":{\"scopeType\":\"anyone\",\"name\":\"Anyone\",\"id\":\"anyone\",\"me\":true,\"requiresKey\":false},\"role\":60}]}",true,[],false,false,null,[],false,false,null,null,null,null,[8,null,[null,null,null,null,[["'.$this->url_spam.'"],"'.$url_spam_host.'"]]],null,null,null,null,null,false,false,false]',
);
$headers[] = "Pragma: no-cache";
$headers[] = "Cache-Control: no-cache";
$headers[] = "Connection: keep-alive";
$headers[] = "X-Same-Domain: 1";
//$headers[] = "Expect: ";
$curl_data['headers'] = $headers;
$curl_data['post'] = http_build_query($p);
$curl_data['url'] = 'https://plusone.google.com/_/sharebox/post/?spam=25&_reqid='.$this-> Gen_reqid().'&rt=j';
$this->code = $this->curl($curl_data);
write_string("logs/".$this->host."_plus_google_sharebox_post.html", $this->code);
echo $this->code;
if (stripos($this->code, 'error') )
{
echo "Not Allowed, случилась какая-то хуйета!
";
echo $this->code;
return false;
} else
{
echo "sharebox post !!!
";
return true ;
}
}
function Gen_reqid()
{
$a = (string) floor(mt_rand (1111111,9999999));
$this-> _reqid ="0". $a;
return $this-> _reqid;
}
function GetAtToken()
{
if(preg_match_all('~",,,,"https://www.google.com/csi","(.*):(.*)",,,~iU', $this-> code, $m))
if($m[1][0] and $m[2][0])
{
$this-> atToken = $m[1][0] .':'.$m[2][0];
return true;
}
}
Регеры: от 20$; Постеры: от 20$; Парсеры: от 10$; Чистый PHP, Human Emulator SkypeUser: parsing-posting
пятница, 30 декабря 2011 г.
Постилка в Google+ (plus.google.com)
Подписаться на:
Комментарии к сообщению (Atom)
респект
ОтветитьУдалить