4399积分小游戏大全_4399小游戏大全手机版

4399积分小游戏大全_4399小游戏大全手机版近日有研究4399的积分小游戏的分数提交规则,但不能太高调的对做类似外挂的东西…写以下代码..仅供分析研究1db=MySql::getInstance();14}1516fu

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

近日有研究4399的积分小游戏的分数提交规则, 但不能太高调的对做类似外挂的东西…

写以下代码..仅供分析研究

 

  1 <?php
2 function emMsg($v) {
3 echo($v);
4 }
5
6 include_once 'mysql.php';
7
8 class getList {
9
10 private $db;
11
12 function __construct() {
13 $this->db = MySql::getInstance();
14 }
15
16 function getPkList($tid = null) {
17 $res = $this->db->query('SELECT * FROM gamelist' . (empty($tid) ? '' : ' where gameTid=\'' . $tid . '\''));
18 $list = array();
19 if (!$this->db->num_rows($res))
20 $list = $this->initList_4399();
21 else
22 while ($row = $this->db->fetch_array($res)) {
23 $list[] = $row;
24 }
25 return $list;
26 }
27
28 /*
29 * 初始化积分游戏
30 */
31
32 function initList_4399() {
33 $this->db->query('delete from gamelist');
34
35 $echo_arr = array();
36
37 for ($j = 1; $j < 12; $j++) {
38 $file_contents = iconv('gb2312', 'utf-8//ignore', file_get_contents('http://pk.4399.com/flash/' . $j . '_1.htm'));
39 $out = array();
40 //<a href="http://pk.4399.com/user/377.htm" target="_blank"><img title="野人钓鱼" alt="野人钓鱼" border="0" src="http://swfpk.4399pk.com:8080/4399pkbak/bak/pkimg/index_img/377.jpg" width="75" height="75"></a>
41 if (preg_match_all('/<li><a href="http:\/\/pk\.4399\.com\/user\/(\d+)\.htm" target="\_blank"><img.*?title="(.*?)".*?src="(.*?)".*?><\/a><p>.*?<\/p><\/li>/', $file_contents, $out)) {
42 //return $out;
43 if (count($out) == 4) {
44 for ($i = 0; $i < count($out[1]); $i++) {
45 $sql = "insert into gamelist (gameId,gameName,gameImg,gameTid) values('{$out[1][$i]}','{$out[2][$i]}','{$out[3][$i]}','{$j}')";
46 $this->db->query($sql);
47 array_push($echo_arr, array($out[1][$i], $out[2][$i], $out[3][$i]));
48 }
49 }
50 }
51 sleep(2);
52 }
53 return $echo_arr;
54 }
55
56 /*
57 * 得到积分
58 * $id 游戏ID
59 * $total 个数
60 * $model 模式 current 当前 all 总排行 month 月排行 last 上轮
61 */
62
63 function getSocre_4399($id, $model = 'all', $total = 3) {
64 $curl = curl_init();
65 curl_setopt($curl, CURLOPT_URL, 'http://my.4399.com/flashgame.php?ac=score_' . $model . '&gameid=' . $id);
66 curl_setopt($curl, CURLOPT_COOKIE, 'Pauth=403370469|66847612|7082ed77f7c271b74d84de349009452a|1328319929|10002|bbeae2e37479547b7c0d5da25d8eb004|0;');
67 // 403370469|66847612|c389c838712319dc773eef783f972fef|1328331099|10001|60bfe9367afff7e737d00b2f998dd7f8|0
68 // 403370469|66847612|580ea10bd8ccf57035a31c7d2abef941|1328333572|10002|ef2b08825599a1fc7ef0ef399b630ca4|0
69 // 403370469|66847612|0773296261e645a773fc245d039db2a6|1328333608|10002|83a5f67767d051e8f31d26df70445663|0
70 //curl_setopt($curl, CURLOPT_REFERER, 'http://www.360buy.com/');
71 //curl_setopt($curl,CURLOPT_HTTPHEADER,array('Referer:http://www.360buy.com/'));
72 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
73 $file_contents = curl_exec($curl);
74 curl_close($curl);
75 //$file_contents = iconv('gb2312', 'utf-8//ignore', $file_contents);
76 /* <td><a href="flashgame.php?ac=profile&uid=212607398">1051414225</a></td>
77 <td>151478</td>
78 * <td align="center"><a href="flashgame.php?ac=profile&uid=103301144">wawa6346</a></td><td align="center">172895</td>
79 * */
80 //echo $file_contents;
81 $out = array();
82 if (preg_match_all('/<td.*?><a href="flashgame.php\?ac\=profile&uid=.*?">.*?<\/a><\/td>.*?<td.*?>(\d+)<\/td>/s', $file_contents, $out)) {
83 $ret_array = array_slice($out[1], 0, $total);
84 $sql = 'update gamelist set gameScore=\'' . json_encode($ret_array) . "' where gameId='{$id}'";
85 $this->db->query($sql);
86 return $ret_array;
87 }
88 return array();
89 //echo $file_contents;
90 }
91
92 function setSocre_4399($id, $m = null, $arr = null) {
93 if (empty($arr)) {
94 $arr = $this->db->once_fetch_array('SELECT gameScore FROM gamelist where gameId=\'' . $id . '\'');
95 $arr = json_decode($arr['gameScore'], true);
96 }
97 if (empty($arr))
98 return 'error';
99
100 //平均分 冠军分 亚军分 季军分
101 if (empty($m)) {
102 $score = floor(array_sum($arr) / count($arr));
103 } else {
104 $score = $arr[$m - 1];
105 }
106
107 //toKen
108 $token = substr(file_get_contents('http://my.4399.com/flashgame/flashgame_reload_token.php'), 7);
109 $miyao = 'ok123';
110 $orderId = date("YmdHis") . rand(100000, 999999);
111 $link = 'xn';
112 //_root.result + "xn" + _root.orderId + _root.miyao + "xn" + _level0.gameId + "xn" + _root.token
113 //http://my.4399.com/flashgame.php?ac=score_submit&token=73880937914d7521321497fbf27a189beea76f&Mac=257be7e4641d73e9a94c968f986e7516&orderId=20120204234108456451&result=10&gameId=346
114 $md5_token = md5($score . $link . $orderId . $link . $miyao . $link . $id . $link . $token);
115 $url = "http://my.4399.com/flashgame.php?ac=score_submit&token={$token}&Mac={$md5_token}&orderId={$orderId}&result={$score}&gameId={$id}";
116 $curl = curl_init();
117 curl_setopt($curl, CURLOPT_URL, $url);
118 curl_setopt($curl, CURLOPT_COOKIE, 'Pauth=403370469|66847612|7082ed77f7c271b74d84de349009452a|1328319929|10002|bbeae2e37479547b7c0d5da25d8eb004|0;');
119 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
120 //curl_setopt($curl, CURLOPT_POST, TRUE);
121 //curl_setopt($curl, CURLOPT_POSTFIELDS, "source=" . Vendor_Sina::appid . "&target_id={$target_id}");
122 $file_contents = curl_exec($curl);
123 curl_close($curl);
124 $out = array();
125 if (preg_match('/<div class="score_number"><h3>.*?<\/h3><p>(\d+)<\/p><\/div>/', $file_contents, $out)) {
126 if (is_numeric($out[1]))
127 return $out[1];
128 }
129 return 'null';
130 }
131
132 }
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/168216.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • http415错误

    http415错误ajax传json数据到controller接受数据碰到415错误415:UnsupportedMediaType :服务器无法处理请求附带的媒体格式解决步骤:1.ajax设置contentTypecontentType:’application/json;charset=UTF-8′,2.设置datadata:JSON.stringify(requestData),…

    2022年5月23日
    52
  • 【Python】Jupyter在PyCharm中的使用

    【Python】Jupyter在PyCharm中的使用最近在学CS231n的课程,打算把作业做一下。由于官方给的例程是用的IPython,后缀名为ipynb,和之前接触的Python写法不一样,来记录一下自己今天踩到的一个坑。其实有一个很简单的解决方法就是安装Anaconda,我也不知道自己为什么要在PyCharm上死磕。步骤0安装Jupyterpipinstalljupyter1新建一个IPython文件这里

    2025年8月4日
    4
  • NeatUpload的安装使用

    NeatUpload的安装使用版本:NeatUpload-1.2.32,用于文件上传。可传大文件。1.在VS工具箱中点右键选“选择项”……将Brettle.Web.NeatUpload.dll添加到工具箱。可以在添加后的工具箱看到

    2022年7月2日
    30
  • Linux查看当前用户及其权限管理[通俗易懂]

    Linux查看当前用户及其权限管理[通俗易懂]linux查看当前用户cwhoami或whoami或whomomlikes[ec2@ip-10-10-5-79~]$whoami创建用户打开终端,输入:sudoadduser[用户名][ec2@ip-10-10-5-79~]$sudoadduserxiaozhou切换用户打开终端,输入:su[用户名]或者su-l[用户名][ec2@ip-10-10-5-79~]$suxiaozhou用户组在Linux系统中,每个用户都有一个归属(用户组

    2022年5月29日
    51
  • java strictfp 关键字_Java 关键字 strictfp

    java strictfp 关键字_Java 关键字 strictfp1 介绍自 Java2 以来 Java 语言增加了一个关键字 strictfp 即 strictfloatp 精确浮点 strictfp 关键字可应用于类 接口或方法 使用 strictfp 关键字声明一个方法时 该方法中所有的 float 和 double 表达式都严格遵守 FP strict 的限制 符合 IEEE 754 规范 当对一个类或接口使用 strictfp 关键字时 该类中的所有代码 包括

    2025年12月7日
    6
  • acwing-最长上升公共子序列(动态规划)[通俗易懂]

    acwing-最长上升公共子序列(动态规划)[通俗易懂]原题连接熊大妈的奶牛在小沐沐的熏陶下开始研究信息题目。小沐沐先让奶牛研究了最长上升子序列,再让他们研究了最长公共子序列,现在又让他们研究最长公共上升子序列了。小沐沐说,对于两个数列 A 和 B,如果它们都包含一段位置不一定连续的数,且数值是严格递增的,那么称这一段数是两个数列的公共上升子序列,而所有的公共上升子序列中最长的就是最长公共上升子序列了。奶牛半懂不懂,小沐沐要你来告诉奶牛什么是最长公共上升子序列。不过,只要告诉奶牛它的长度就可以了。数列 A 和 B 的长度均不超过 3000。输入格式

    2022年8月8日
    11

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号