{"id":31136,"date":"2024-11-25T11:32:59","date_gmt":"2024-11-25T03:32:59","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31136\/"},"modified":"2024-11-25T11:32:59","modified_gmt":"2024-11-25T03:32:59","slug":"php%e5%ae%9e%e7%8e%b0%e5%be%ae%e4%bf%a1%e8%b7%b3%e4%b8%80%e8%b7%b3%e5%b0%8f%e6%b8%b8%e6%88%8f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31136\/","title":{"rendered":"php\u5b9e\u73b0\u5fae\u4fe1\u8df3\u4e00\u8df3\u5c0f\u6e38\u620f"},"content":{"rendered":"<p>\u6700\u8fd1\u5fae\u4fe1\u8df3\u4e00\u8df3\u5c0f\u6e38\u620f\u5f88\u706b\uff0c\u672c\u6587\u4e3b\u8981\u4e3a\u5927\u5bb6\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5fae\u4fe1\u8df3\u4e00\u8df3\u8f85\u52a9php\u4ee3\u7801\u5b9e\u73b0\uff0c\u5177\u6709\u4e00\u5b9a\u7684\u53c2\u8003\u4ef7\u503c\uff0c\u611f\u5174\u8da3\u7684\u5c0f\u4f19\u4f34\u4eec\u53ef\u4ee5\u53c2\u8003\u4e00\u4e0b\uff0c\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\u3002<\/p>\n<p>\u672c\u6587\u5b9e\u4f8b\u4e3a\u5927\u5bb6\u5206\u4eab\u4e86php\u5fae\u4fe1\u8df3\u4e00\u8df3\u7684\u5177\u4f53\u4ee3\u7801\uff0c\u4f9b\u5927\u5bb6\u53c2\u8003\uff0c\u5177\u4f53\u5185\u5bb9\u5982\u4e0b<\/p>\n<p><\/p>\n<pre>&lt;?php  \r\n \r\nrequire &#039;config.php&#039;; \r\n \r\nfunction similar($rgb1, $rgb2) { \r\n $r1 = ($rgb1 &gt;&amp;gt;&nbsp;16)&nbsp;&amp;amp;&nbsp;0xFF;&nbsp;\r\n&nbsp;$g1&nbsp;=&nbsp;($rgb1&nbsp;&amp;gt;&amp;gt;&nbsp;8)&nbsp;&amp;amp;&nbsp;0xFF;&nbsp;\r\n&nbsp;$b1&nbsp;=&nbsp;$rgb1&nbsp;&amp;amp;&nbsp;0xFF;&nbsp;\r\n&nbsp;$r2&nbsp;=&nbsp;($rgb2&nbsp;&amp;gt;&amp;gt;&nbsp;16)&nbsp;&amp;amp;&nbsp;0xFF;&nbsp;\r\n&nbsp;$g2&nbsp;=&nbsp;($rgb2&nbsp;&amp;gt;&amp;gt;&nbsp;8)&nbsp;&amp;amp;&nbsp;0xFF;&nbsp;\r\n&nbsp;$b2&nbsp;=&nbsp;$rgb2&nbsp;&amp;amp;&nbsp;0xFF;&nbsp;\r\n&nbsp;return&nbsp;abs($r1&nbsp;-&nbsp;$r2)&nbsp;&nbsp;20)&nbsp;{&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(!isset($mid))&nbsp;$mid&nbsp;=&nbsp;($l&nbsp;+&nbsp;$r)&nbsp;\/&nbsp;2;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($r&nbsp;-&nbsp;$l&nbsp;&amp;gt;&nbsp;BODY_WIDTH&nbsp;*&nbsp;1.1){&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($r&nbsp;&nbsp;(%d,&nbsp;%d)&nbsp;\",&nbsp;$sx,&nbsp;$sy,&nbsp;$tx,&nbsp;$ty);&nbsp;\r\n&nbsp;\/\/&nbsp;\u56fe\u50cf\u63cf\u70b9&nbsp;\r\n&nbsp;imagefilledellipse($image,&nbsp;$sy,&nbsp;$sx,&nbsp;10,&nbsp;10,&nbsp;0xFF0000);&nbsp;\r\n&nbsp;imagefilledellipse($image,&nbsp;$ty,&nbsp;$tx,&nbsp;10,&nbsp;10,&nbsp;0xFF0000);&nbsp;\r\n&nbsp;imagepng($image,&nbsp;sprintf(\"screen\/%05d.png\",&nbsp;$id));&nbsp;\r\n&nbsp;\/\/&nbsp;\u8ba1\u7b97\u6309\u538b\u65f6\u95f4&nbsp;\r\n&nbsp;$time&nbsp;=&nbsp;pow(pow($tx&nbsp;-&nbsp;$sx,&nbsp;2)&nbsp;+&nbsp;pow($ty&nbsp;-&nbsp;$sy,&nbsp;2),&nbsp;0.425)&nbsp;*&nbsp;PRESS_TIME;&nbsp;\r\n&nbsp;$time&nbsp;=&nbsp;round($time);&nbsp;\r\n&nbsp;echo&nbsp;sprintf(\"time:&nbsp;%f\n\",&nbsp;$time);&nbsp;\r\n&nbsp;press($time);&nbsp;\r\n&nbsp;\/\/&nbsp;\u7b49\u5f85\u4e0b\u4e00\u6b21\u622a\u56fe&nbsp;\r\n&nbsp;sleep(SLEEP_TIME);&nbsp;\r\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p><\/p>\n<pre>&lt;?php  \r\n\/** \r\n * \u6309\u538b\u529b\u5ea6\u53c2\u6570\uff0c\u6839\u636e\u5b9e\u9645\u8868\u73b0\u8fdb\u884c\u8c03\u8282 \r\n * \u5982\u679c\u8df3\u8fdc\u4e86\u5c31\u8c03\u4f4e\u70b9 \r\n *\/ \r\n\/\/define(&#039;PRESS_TIME&#039;, 3.752); \r\ndefine(&#039;PRESS_TIME&#039;, 3.452); \r\n\/** \r\n * \u7761\u7720\u65f6\u95f4 \r\n *\/ \r\ndefine(&#039;SLEEP_TIME&#039;, 2); \r\n\/** \r\n * \u89d2\u8272\u5bbd\u5ea6\uff0c\u4e0d\u9700\u8981\u8c03\u8282 \r\n *\/ \r\ndefine(&#039;BODY_WIDTH&#039;, 75);<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>###################\u6211\u662f\u5206\u5272\u7ebf######################<\/p>\n<p>\u53e6\u4e00\u79cd\u65b9\u6cd5<\/p>\n<p><\/p>\n<pre>function&nbsp;jump()&nbsp;{&nbsp;\r\nsleep(2.5);\/\/\u5ef6\u8fdf&nbsp;2.5&nbsp;\u79d2\uff0c\u97f3\u4e50\u76d2\u3001\u4fbf\u5229\u5e97\u3001\u4e95\u76d6\u7b49\u7ad9&nbsp;2&nbsp;\u79d2\u52a0\u5206&nbsp;\r\n$screenShell&nbsp;=&nbsp;\"cd&nbsp;D:&amp;amp;adb&nbsp;shell&nbsp;\/system\/bin\/screencap&nbsp;-p&nbsp;\/sdcard\/screenshot.png&amp;amp;adb&nbsp;pull&nbsp;\/sdcard\/screenshot.png&nbsp;d:jumper\/screenshot.png\";&nbsp;\r\nexec($screenShell);\/\/\u622a\u56fe&nbsp;\r\n&nbsp;\r\n$i=imagecreatefrompng(\"d:jumper\/screenshot.png\");\/\/\u8bfb\u53d6\u56fe\u7247&nbsp;\r\n$point=array();&nbsp;\r\nfor&nbsp;($y=400;$y&lt;imagesy for&gt;&amp;gt;16)&nbsp;&amp;amp;&nbsp;0xFF;&nbsp;\r\n$point[\"now\"][\"g\"]&nbsp;=&nbsp;($rgb&amp;gt;&amp;gt;8)&nbsp;&amp;amp;&nbsp;0xFF;&nbsp;\r\n$point[\"now\"][\"b\"]&nbsp;=&nbsp;$rgb&nbsp;&amp;amp;&nbsp;0xFF;&nbsp;\r\nif(isset($point[\"last\"][\"r\"])){&nbsp;\r\nif(!isset($point[\"x\"][\"a\"])){&nbsp;\r\nif(&nbsp;abs($point[\"now\"][\"r\"]-$point[\"last\"][\"r\"])&amp;gt;1&nbsp;\r\nor&nbsp;abs($point[\"now\"][\"g\"]-$point[\"last\"][\"g\"])&amp;gt;1&nbsp;\r\nor&nbsp;abs($point[\"now\"][\"b\"]-$point[\"last\"][\"b\"])&amp;gt;1&nbsp;\r\n){&nbsp;\r\n$point[\"x\"][\"a\"]=$x;&nbsp;\r\nif(imagesx($i)\/2&amp;gt;$x){&nbsp;\r\n$point[\"direction\"]=\"left\";&nbsp;\r\n}else{&nbsp;\r\n$point[\"direction\"]=\"right\";&nbsp;\r\n}&nbsp;\r\n$point[\"a\"]=$point[\"last\"];&nbsp;\r\n}&nbsp;\r\n}else{&nbsp;\r\nif($point[\"now\"]==$point[\"a\"]){&nbsp;\r\n$point[\"x\"][\"b\"]=$x-1;&nbsp;\r\nbreak;&nbsp;\r\n}&nbsp;\r\n}&nbsp;\r\n}&nbsp;\r\n$point[\"last\"]=$point[\"now\"];&nbsp;\r\n}&nbsp;\r\nif(isset($point[\"x\"])){&nbsp;\r\nbreak;&nbsp;\r\n}&nbsp;\r\n}&nbsp;\r\n&nbsp;\r\n$param[\"left\"]&nbsp;=&nbsp;3750;&nbsp;\r\n$param[\"right\"]&nbsp;=&nbsp;3100;&nbsp;\r\n$time&nbsp;=&nbsp;pow((abs(imagesx($i)\/2-($point[\"x\"][\"a\"]+$point[\"x\"][\"a\"])\/2)\/imagesx($i)),1)*$param[$point[\"direction\"]];&nbsp;\r\n&nbsp;\r\nif($time&lt;p&gt;\u5927\u5bb6\u5b66\u4f1a\u4e86\u5417\uff1f\u8d76\u7d27\u52a8\u624b\u5c1d\u8bd5\u4e00\u4e0b\u5427\u3002&lt;\/p&gt;\n&lt;p&gt;&lt;span&gt;\u7acb\u5373\u5b66\u4e60&lt;\/span&gt;\u201c&lt;a href=\"https:\/\/pan.quark.cn\/s\/7fc7563c4182\" style=\"text-decoration: underline !important; color: blue; font-weight: bolder;\" rel=\"nofollow\" target=\"_blank\"&gt;PHP\u514d\u8d39\u5b66\u4e60\u7b14\u8bb0\uff08\u6df1\u5165\uff09&lt;\/a&gt;\u201d\uff1b&lt;\/p&gt;\n&lt;p&gt;\u76f8\u5173\u63a8\u8350\uff1a&lt;br&gt;&lt;\/p&gt;\n&lt;p&gt;&lt;a href=\"http:\/\/www.php.cn\/js-tutorial-384152.html\" target=\"_self\"&gt;\u539f\u751fjs\u5b9e\u73b0html5\u6253\u7816\u5757\u5c0f\u6e38\u620f\u7684\u65b9\u6cd5&lt;\/a&gt;&lt;\/p&gt;\n&lt;p&gt;&lt;a href=\"http:\/\/www.php.cn\/js-tutorial-381972.html\" target=\"_self\"&gt;html5\u5236\u4f5c\u5403\u6708\u997c\u5c0f\u6e38\u620f\u6559\u7a0b&lt;\/a&gt;&lt;\/p&gt;\n&lt;p&gt;&lt;a href=\"http:\/\/www.php.cn\/js-tutorial-377174.html\" target=\"_self\"&gt;JavaScript\u7f16\u5199\u7684\u7f51\u9875\u5c0f\u6e38\u620f\u5206\u4eab\uff08\u56fe\uff09&lt;\/a&gt;&lt;\/p&gt;&lt;\/imagesy&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fphp\u5b9e\u73b0\u5fae\u4fe1\u8df3\u4e00\u8df3\u5c0f\u6e38\u620f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5fae\u4fe1\u8df3\u4e00\u8df3\u5c0f\u6e38\u620f\u5f88\u706b\uff0c\u672c\u6587\u4e3b\u8981\u4e3a\u5927\u5bb6\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5fae\u4fe1\u8df3\u4e00\u8df3\u8f85\u52a9php\u4ee3\u7801\u5b9e\u73b0\uff0c\u5177\u6709\u4e00\u5b9a\u7684\u53c2\u8003\u4ef7\u503c\uff0c\u611f\u5174\u8da3\u7684\u5c0f\u4f19\u4f34\u4eec\u53ef\u4ee5\u53c2\u8003\u4e00\u4e0b\uff0c\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\u3002 \u672c\u6587\u5b9e\u4f8b\u4e3a\u5927\u5bb6\u5206\u4eab\u4e86php\u5fae\u4fe1\u8df3\u4e00\u8df3\u7684\u5177\u4f53\u4ee3\u7801\uff0c\u4f9b\u5927\u5bb6\u53c2\u8003\uff0c\u5177\u4f53\u5185\u5bb9\u5982\u4e0b &lt;?php require &#039;config.php&#039;; function similar($rgb1, $rgb2) { $r1 = ($rgb1 &gt;&amp;gt;&nbsp;16)&nbsp;&amp;amp;&nbsp;0xFF;&nbsp; &nbsp;$g1&nbsp;=&nbsp;($rgb1&nbsp;&amp;gt;&amp;gt;&nbsp;8)&nbsp;&amp;amp;&nbsp;0xFF;&nbsp; &nbsp;$b1&nbsp;=&nbsp;$rgb1&nbsp;&amp;amp;&nbsp;0xFF;&nbsp; &nbsp;$r2&nbsp;=&nbsp;($rgb2&nbsp;&amp;gt;&amp;gt;&nbsp;16)&nbsp;&amp;amp;&nbsp;0xFF;&nbsp; &nbsp;$g2&nbsp;=&nbsp;($rgb2&nbsp;&amp;gt;&amp;gt;&nbsp;8)&nbsp;&amp;amp;&nbsp;0xFF;&nbsp; &nbsp;$b2&nbsp;=&nbsp;$rgb2&nbsp;&amp;amp;&nbsp;0xFF;&nbsp; &nbsp;return&nbsp;abs($r1&nbsp;&#8211;&nbsp;$r2)&nbsp;&nbsp;20)&nbsp;{&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(!isset($mid))&nbsp;$mid&nbsp;=&nbsp;($l&nbsp;+&nbsp;$r)&nbsp;\/&nbsp;2;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($r&nbsp;&#8211;&nbsp;$l&nbsp;&amp;gt;&nbsp;BODY_WIDTH&nbsp;*&nbsp;1.1){&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($r&nbsp;&nbsp;(%d,&nbsp;%d)&nbsp;&#8220;,&nbsp;$sx,&nbsp;$sy,&nbsp;$tx,&nbsp;$ty);&nbsp; &nbsp;\/\/&nbsp;\u56fe\u50cf\u63cf\u70b9&nbsp; &nbsp;imagefilledellipse($image,&nbsp;$sy,&nbsp;$sx,&nbsp;10,&nbsp;10,&nbsp;0xFF0000);&nbsp; &nbsp;imagefilledellipse($image,&nbsp;$ty,&nbsp;$tx,&nbsp;10,&nbsp;10,&nbsp;0xFF0000);&nbsp; &nbsp;imagepng($image,&nbsp;sprintf(&#8220;screen\/%05d.png&#8221;,&nbsp;$id));&nbsp; &nbsp;\/\/&nbsp;\u8ba1\u7b97\u6309\u538b\u65f6\u95f4&nbsp; &nbsp;$time&nbsp;=&nbsp;pow(pow($tx&nbsp;&#8211;&nbsp;$sx,&nbsp;2)&nbsp;+&nbsp;pow($ty&nbsp;&#8211;&nbsp;$sy,&nbsp;2),&nbsp;0.425)&nbsp;*&nbsp;PRESS_TIME;&nbsp; &nbsp;$time&nbsp;=&nbsp;round($time);&nbsp; &nbsp;echo&nbsp;sprintf(&#8220;time:&nbsp;%f &#8220;,&nbsp;$time);&nbsp; &nbsp;press($time);&nbsp; &nbsp;\/\/&nbsp;\u7b49\u5f85\u4e0b\u4e00\u6b21\u622a\u56fe&nbsp; &nbsp;sleep(SLEEP_TIME);&nbsp; } \u767b\u5f55\u540e\u590d\u5236 &lt;?php \/** * \u6309\u538b\u529b\u5ea6\u53c2\u6570\uff0c\u6839\u636e\u5b9e\u9645\u8868\u73b0\u8fdb\u884c\u8c03\u8282 * \u5982\u679c\u8df3\u8fdc\u4e86\u5c31\u8c03\u4f4e\u70b9 *\/ \/\/define(&#039;PRESS_TIME&#039;, 3.752); define(&#039;PRESS_TIME&#039;, 3.452); \/** * \u7761\u7720\u65f6\u95f4 *\/ define(&#039;SLEEP_TIME&#039;, 2); \/** * [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-31136","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=31136"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31136\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}