⚠在这个问题中,PHP 的使用方式不同寻常。它不用作服务器端语言(“没有打开浏览器”)。它旨在在我自己的计算机上运行,模拟我计算机上的鼠标移动。
是否可以在 PHP 中模拟鼠标的移动?我的意思是做类似的事情:
$mouse->moveToCoordinate($x,$Y); // will move the screen to to the coordinate $X, $Y of the screen
$mouse->moveVector($x,$Y); // will move from the current point to the (current X + $X, current Y + $Y);
$mouse->click(); // will simulate a mouse click on the screen.
这应该是可用的,即使没有打开浏览器(所以不能使用经典的浏览器端 javascript 解决方案)。