代码拉取完成,页面将自动刷新
同步操作将从 Bygones/PHP-DouyinRobot 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
class Adb
{
protected $follow = [];
protected $slide = [];
protected $fabulous = [];
public function __construct(array $config)
{
$this->follow = $config["follow"];
$this->slide = $config["slide"];
$this->fabulous = $config["fabulous"];
}
/**
* Describe:关注
* @Author: Bygones
* Date: 2019-06-15
* Time: 23:16
* @return mixed
*/
public function Follow()
{
$x = $this->follow["x"];
$y = $this->follow["y"];
exec("adb shell input tap ".$x." ".$y." ");
return true;
}
/**
* Describe:滑动
* @Author: Bygones
* Date: 2019-06-15
* Time: 23:22
* @return mixed
*/
public function Slide()
{
$x = $this->slide["x"];
$y = $this->slide["y"];
$x1 = $this->slide["x1"];
$y1 = $this->slide["y1"];
exec("adb shell input swipe ".$x." ".$y." ".$x1." ".$y1." ");
return true;
}
/**
* Describe:点赞
* @Author: Bygones
* Date: 2019-06-16
* Time: 11:05
*/
public function Fabulous()
{
$x = $this->fabulous["x"];
$y = $this->fabulous["y"];
exec("adb shell input tap ".$x." ".$y." ");
return true;
}
/**
* Describe:截图
* @Author: Bygones
* Date: 2019-06-15
* Time: 23:33
*/
public function Screenshot()
{
$dir = __DIR__ . "/img/dy".date("YmdHis").".png";
exec("adb exec-out screencap -p > ".$dir);
return $dir;
}
}
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。