research_run.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <?php
  2. $url = 'http://192.168.1.110/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=150518546433385490';
  3. $x = serialize($url);
  4. $y = unserialize($x);
  5. $cur_time = date("Y-m-d H:i:s");
  6. $tm = strtotime('2016-06-04 10:00:00');
  7. function parase_wxinfo($wxinfo)
  8. {
  9. $user = urldecode($wxinfo);
  10. $user = json_decode($user,true);
  11. $info = array();
  12. $info['member_nickname'] = $user['nickname'];
  13. $info['member_wxopenid'] = $user['openid'];
  14. $info['member_avatar'] = $user['headimgurl'];
  15. $info['member_sex'] = intval($user['sex']);
  16. return $info;
  17. }
  18. $str = <<< EOT
  19. {%22city%22:%22West%22,%22country%22:%22CN%22,%22headimgurl%22:%22http://wx.qlogo.cn/mmopen/PiajxSqBRaEK3HJTr0VPI0NwVZ6FpsNiaqZPpYGpmRoN1Amn2Y12ansyKkNZ3SwMtUokFfrcic0Vcu5rxNBRVVyjA/0%22,%22nickname%22:%22%E6%B1%9F%E6%B5%B7%E8%8B%97@%E4%B8%BD%E4%BA%BA%E4%B8%BD%E5%A6%86%22,%22openid%22:%22o-E2Rw6Ph4tFPCmbICFumslzUzc8%22,%22privilege%22:[],%22province%22:%22Beijing%22,%22sex%22:1,%22unionid%22:%22ogAyDv5P8mRT_dcd7N9FsBYLUrFQ%22,%22additionalProperties%22:{},%22code%22:0}
  20. EOT;
  21. $str = urldecode($str);
  22. $x = $str;
  23. $user = parase_wxinfo($str);
  24. //include BASE_ROOT_PATH . "/research/db.php";
  25. //include BASE_ROOT_PATH . "/research/function_test.php";
  26. //include BASE_ROOT_PATH . "/research/sms_test.php";
  27. //include BASE_ROOT_PATH . "/research/wxpay.php";
  28. //define('BASE_CORE_PATH',BASE_ROOT_PATH.'/core');
  29. //define('BASE_DATA_PATH',BASE_ROOT_PATH.'/data');
  30. //define('BASE_MOBILE_PATH',BASE_ROOT_PATH.'/mobile');
  31. //define('BASE_CRONTAB_PATH',BASE_ROOT_PATH.'/crontab');
  32. //define('BASE_UPLOAD_PATH',BASE_DATA_PATH.'/upload');
  33. //define('BASE_UTIL_PATH',BASE_ROOT_PATH.'/util');
  34. //
  35. //require_once (BASE_ROOT_PATH . '/helper/text_filter.php');
  36. //require_once (BASE_ROOT_PATH . '/helper/category_helper.php');
  37. //
  38. //
  39. //define('InShopNC',true);
  40. //
  41. //
  42. //$str = <<< EOT
  43. //<script type="text/javascript">
  44. // function app(){
  45. // var app=navigator.userAgent.toLowerCase(),//判断设备
  46. // app_nav=navigator.appVersion.toLowerCase(),
  47. // href='';
  48. // if(app_nav.indexOf('iphone')>-1&&app.indexOf('iphone')){
  49. // href='https://www.pgyer.com/pfcB';
  50. // }else if(app.indexOf('micromessenger')>-1&&app_nav.indexOf('android')>-1){
  51. // href="javascript:void(0)";
  52. // }
  53. // else {
  54. // href='http://a.lrlz.com/data/upgrade/lrlz_release_1.0.8.apk';
  55. // }
  56. // return href;
  57. //
  58. // }
  59. // function href(){
  60. // $('#href_link').attr('href',app());
  61. // }
  62. // href();
  63. //</script>
  64. //
  65. // <div class="top">
  66. // <p class="title">红包详情</p>
  67. // <div class="logo"></div>
  68. // </div>
  69. //EOT;
  70. //
  71. //
  72. //$str = text_filter::filter_html($str);
  73. //
  74. //category_helper::instance()->
  75. //
  76. //
  77. //
  78. //
  79. //
  80. //$x = time();
  81. //
  82. //$member_birthday = strftime ("%Y-%m-%d %H:%M:%S",time());
  83. //
  84. //function is_date($time)
  85. //{
  86. // $pattern = '/[\d]{4}-[\d]{1,2}-[\d]{1,2}/';
  87. //
  88. // return (preg_match($pattern, $time) == 1);
  89. //}
  90. //
  91. //$x = '';
  92. //$y = isset($x);
  93. //
  94. //if('safdasefasefasf'==0){
  95. // echo "该字符串转换为数字 等于 0 <br/>";
  96. //}//output:该字符串转换为数字 等于零。
  97. //
  98. //$a='0';
  99. //if($a==''){
  100. // echo "0 等于 '' <br/>";
  101. //} //output:0 等于''
  102. //if(trim($a)==''){
  103. // echo "trim(0)等于'' <br/>";
  104. //} //no output
  105. //
  106. //if($a===''){
  107. // echo "0==='' <br/>";
  108. //} //no output
  109. //if(empty($a)){
  110. // echo "'' is empty <br/>";
  111. //} //output:'' is empty
  112. //if(is_null($a)){
  113. // echo "0 is null <br/>";
  114. //} //no output
  115. //if(is_numeric($a)){
  116. // echo "0 is numeric <br/>";
  117. //} //output:0 is numeric
  118. //if(is_string($a)){
  119. // echo "0 is string <br/>";
  120. //} //no output
  121. //if(strval($a)==''){
  122. // echo "转换成字符串的0 is '' <br/>";
  123. //} //no output
  124. ////========= 判断 0 和 '' 以及 empty null false的关系 end =========//
  125. ////========= 判断 '' 和 0 以及 empty null false的关系 start =========//
  126. //$b = '';
  127. //if($b==0){
  128. // echo "'' 等于 0 <br/>";
  129. //} //output:'' 等于 0
  130. //if(!''){
  131. // echo "'' 就是false <br/>";
  132. //} //output:'' 就是false
  133. //if(!0){
  134. // echo "0 就是false <br/>";
  135. //} //output:0 就是false
  136. ////========= 判断 '' 和 0 以及 empty null false的关系 end =========//
  137. //echo "在判断空('')的时候一定要小心,0 也相当于'' ,0 和 '' 都相当于空字符和false,判断为空最好用===";
  138. //
  139. //$x = '1978-02-05';
  140. //$y = is_date($x);
  141. //
  142. //$x = time();
  143. //
  144. //$member_birthday = strftime ("%Y-%m-%d","{$x}");
  145. //
  146. //$time = strtotime($member_birthday);
  147. //
  148. //
  149. //$str = NULL;
  150. //$y = '';
  151. //if(isset($str)) {
  152. // $x = 0;
  153. //}
  154. //
  155. //if(empty($str)) {
  156. // $x = 1;
  157. //}
  158. //
  159. //if($str == NULL) {
  160. // $x = 2;
  161. //}
  162. //
  163. //if(isset($y)) {
  164. // $x = 0;
  165. //}
  166. //
  167. //if(empty($y)) {
  168. // $x = 1;
  169. //}
  170. //
  171. //if($y == NULL) {
  172. // $x = 2;
  173. //}
  174. //
  175. //
  176. //$file = "/mobile/index.php";
  177. //$ops = explode("?",$file);
  178. //
  179. //$squery = $ops[1];
  180. //$params = preg_split('/&|=/', $squery);
  181. //
  182. //for ($i = 0; $i < count($params); ++$i) {
  183. // $key = $params[$i];
  184. // $val = $params[++$i];
  185. // $_GET[$key] = $val;
  186. // $_POST[$key] = $val;
  187. //}
  188. //
  189. //
  190. //
  191. //
  192. //$ret = array('jsObj' => NULL,'jsArray' => array());
  193. //unset($ret['xxx']);
  194. //$ret = json_encode($ret);
  195. //
  196. //define('BASE_ROOT_PATH',str_replace('\\','/',dirname(__FILE__)));
  197. //
  198. //echo BASE_ROOT_PATH."\n";
  199. //
  200. //require_once (BASE_ROOT_PATH . '/fooder.php');
  201. //
  202. //echo $argv;
  203. //
  204. //function help_out()
  205. //{
  206. // echo "fetch_goods:start fetch goods.\r\n";
  207. // echo "fillgcid:start fill all goods class id.\r\n";
  208. // echo "checkgoods:check all goods class id.\r\n";
  209. //
  210. //}
  211. //
  212. //
  213. //$time = -microtime();
  214. ////$hash = 0;
  215. ////for ($i=0; $i < rand(1000,4000); ++$i) {
  216. //// $hash ^= md5(substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, rand(1,10)));
  217. ////}
  218. //$time += microtime();
  219. //$y = sprintf('%f', $time);
  220. //
  221. //
  222. //$y = strtotime('2016-12-12 01:01:01');
  223. //
  224. //$y = urldecode('%E4%B8%AD%E9%80%9A%E5%BF%AB%E9%80%92');
  225. //
  226. //$x=new date();
  227. //
  228. //define('StartTime', microtime(true));
  229. //define('TIMESTAMP', time());
  230. //
  231. //if(count($argv) == 1) {
  232. //
  233. // return;
  234. //}