Thứ Năm, 26 tháng 10, 2017

auto đăng bài xong có 150 like luôn

xem video để hiểu nhé https://www.youtube.com/watch?v=u2rBQ3WlGkc

<?php
set_time_limit(0);
//error_reporting(false);
//$uidKhachHang='100006526419466';
$uidKhachHang=$_GET['uid'];
//echo $uidKhachHang."<br>";

//nhap mang token vao day
$token = array('token 1','token 2');

$url="";
//tim token dau tien con song
for ($i=0; $i <count($token) ; $i++) {
  //$token[$i];
 
  if(CheckTokenLive($token[$i])){
//echo "token live";
  $url='https://graph.facebook.com/'.$uidKhachHang.'/feed?access_token='.$token[$i];
break;

}else{
//echo "token die";
}
 }

//echo $url;

if(GetData($url,$data)){

$mangData=json_decode($data,true);

        // set_time_limit(0);
//$idBaiMsNhat="100006526419466_1984632148430980";
        $idBaiMsNhat=$mangData["data"][0][id];
      echo $idBaiMsNhat."<br>";

      // //ham chay auto chinh
for ($i=0; $i <count($token) ; $i++) {
# code...
echo "token thu ".$i."<br>";
HamLikeBaiMsNhatCuaKhacHang($token[$i],$idBaiMsNhat);
}
}








function HamLikeBaiMsNhatCuaKhacHang($token,$idBaiMsNhat)
{



$url='https://graph.facebook.com/'.$idBaiMsNhat.'/reactions?type=LOVE&method=post&access_token='.$token;
if(GetData($url,$data)){
echo $data."<br>";
}else{
echo "fail";
}



}

function CheckTokenLive($token)
{
$url='https://graph.facebook.com/me?access_token='.$token;
if(GetData($url,$data)){
$mangData=json_decode($data,true);
if(isset($mangData['id'])){
return true;
}else{
return false;
}
}else{
return false;
}
}



// $url='https://graph.facebook.com/100012905893374_320282958411898/reactions?type=PRIDE&method=post&access_token=EAAAAUaZA8jlABABOFezBiBZCgpYMP4chZBEiUEC5WbNo9F5IGEHeFndKKZAOZC6bWF2bcXvtsVpInskYZCJhOSng1I5e8pxmEbplQI7Rfd7DzM8a6kZBQDIcpFZBg8XK473ZCZCYfeZBK8hGI1ewPqSjJAWnDbxaTcaRcfIXZAwlgVWthAZDZD';
// if(GetData($url,$data)){
// echo "$data";
// }else{
// echo "ko the get dc xml";
// }
 function GetData($url,&$data='')
 {


$ch=curl_init();

curl_setopt($ch,CURLOPT_URL, $url);
// disable auto echo
curl_setopt($ch,CURLOPT_RETURNTRANSFER , true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36');
curl_setopt($ch,CURLOPT_REFERER , 'https://www.google.com.vn/');
curl_setopt($ch,CURLOPT_ENCODING , '');
curl_setopt($ch,CURLOPT_FOLLOWLOCATION , false);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
//curl_setopt($ch,CURLOPT_HEADER , true);
curl_setopt($ch,CURLOPT_TIMEOUT , 10);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT , 10);
$data=curl_exec($ch);

$err=curl_error($ch);
curl_close($ch);
if($err){
return false;
}
return true;
}




 ?>

Posted in

0 nhận xét:

Đăng nhận xét