优惠券订单及其他脚本

order.php 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. define("PUSH_URL",'https://tbk.726p.com/api/v2/user/giveRebate');//接口地址
  3. $arr = array(
  4. ['244748364802501706','18873288097'],
  5. ['242382756408237182','18340434088'],
  6. ['242474884256237182','18340434088'],
  7. ['242835047030237182','18340434088'],
  8. ['242492133998796272','13801137917'],
  9. ['241740645325915595','13935459953'],
  10. ['242835047030237182','18873288097'],
  11. ['242474884256237182','18873288097'],
  12. ['242382756408237182','18873288097'],
  13. ['264901696868860035','17665373625'],
  14. ['262532097449474435','18873288097'],
  15. ['265466912331474435','18873288097'],
  16. ['238181957599022298','18669998330'],
  17. ['241473447352680075','13754120428'],
  18. ['244650926478237624','15114808997'],
  19. ['244920847166237624','15114808997'],
  20. ['259537154525689668','18970340281'],
  21. ['2411993304310680075','13754120428'],
  22. ['2465450133220328705','18686181143'],
  23. ['241930372304750976','18907930773'],
  24. ['239597732341750976','18907930773'],
  25. ['258731041090208557','18873288097'],
  26. ['259880640589652358','13864048456'],
  27. ['259880640588652358','13864048456'],
  28. ['259880640591652358','13864048456'],
  29. ['262291584867652358','13864048456'],
  30. ['262893763562652358','13864048456'],
  31. ['262450304567878646','15252625380'],
  32. ['247681166614158906','13592853332'],
  33. ['264314881246234427','18626037702'],
  34. ['264314881247234427','18626037702'],
  35. ['242014663913674791','17702593393'],
  36. ['240568263832674791','17702593393'],
  37. ['240568263828674791','17702593393'],
  38. ['230285669031674791','17702593393'],
  39. ['234706119117674791','17702593393'],
  40. ['247809294364924020','15817660182'],
  41. ['71218818350383','15537460319'],
  42. ['75107548811909','15537460319'],
  43. ['259469761519260159','15552436660'],
  44. ['262808642462878646','15252625380'],
  45. ['262450304567878646','15252625380'],
  46. ['244629645148989918','15176099647'],
  47. ['247071694714989918','15176099647'],
  48. ['242492133998796272','13801137917'],
  49. ['237445604804644783','18270155661'],
  50. ['229890983945850970','18192338962'],
  51. ['229392676569850970','18192338962'],
  52. ['239061765165023393','18751754908'],
  53. ['237052102817023393','18751754908'],
  54. ['232017703581023393','18751754908'],
  55. ['229392676569850970','18192338962'],
  56. ['239344228480850970','18192338962'],
  57. ['232446374840850970','18192338962'],
  58. ['232256775760850970','18192338962'],
  59. ['231988486550850970','18192338962'],
  60. ['231443429646850970','18192338962'],
  61. ['229651110389850970','18192338962'],
  62. ['229392676569850970','18192338962'],
  63. ['229894535075850970','18192338962'],
  64. ['229382405127850970','18192338962'],
  65. ['229381157257850970','18192338962'],
  66. ['229892967263850970','18192338962'],
  67. ['229768231103850970','18192338962'],
  68. ['229392676569850970','18192338962'],
  69. ['229890983945850970','18192338962'],
  70. ['239344228480850970','18192338962'],
  71. ['244629645148989918','15176099647'],
  72. ['247071694714989918','15176099647'],
  73. );
  74. foreach($arr as $k=>$v){
  75. $params = array();
  76. $params['phone'] = $v[1];
  77. $params['order_id'] = $v[0];
  78. $res = curl_post(PUSH_URL,$params);
  79. $result = json_decode($res,true);
  80. echo '订单号:'.$v[0].' 手机号:'.$v[1].' 结果:';
  81. if($result['errno']==0){
  82. echo $result['rst']['data'];
  83. }else{
  84. echo $result['rst']['msg'];
  85. }
  86. echo "\n";
  87. }
  88. # curl调用接口push
  89. function curl_post($url, $params){
  90. $ch = curl_init();
  91. curl_setopt($ch, CURLOPT_URL, $url);
  92. curl_setopt($ch, CURLOPT_HEADER, 0);
  93. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  94. curl_setopt($ch, CURLOPT_POST, 1);
  95. curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
  96. $response = curl_exec($ch);
  97. curl_close($ch);
  98. return $response;
  99. }