优惠券订单及其他脚本

1.php 1.7KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. function curl_post($url, $param){
  3. $curlPost = $param;
  4. $header = array(
  5. 'Cookie: jiathis_rdcd=d7186b817fe60073a5eef118b1b65161; addo=ture; jiathis_rdcdcc=fa5375df32bda8862801ea43b6358683; PHPSESSID=n7e3q2lqi9cltct88f3nl1dq54; Hm_lvt_5a903fe4f343bef5b71db5664648022b=1539155183,1539156573,1539315083; Hm_lpvt_5a903fe4f343bef5b71db5664648022b=1539315083' ,
  6. 'Origin: https://www.taodaxiang.com' ,
  7. 'Accept-Encoding: gzip, deflate, br' ,
  8. 'Accept-Language: zh-CN,zh;q=0.9' ,
  9. 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' ,
  10. 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' ,
  11. 'Accept: application/json, text/javascript, */*; q=0.01' ,
  12. 'Referer: https://www.taodaxiang.com/score/index/init' ,
  13. 'X-Requested-With: XMLHttpRequest' ,'Connection: keep-alive'
  14. );
  15. $ch = curl_init();//初始化curl
  16. curl_setopt($ch, CURLOPT_URL,$url);
  17. curl_setopt($ch, CURLOPT_HEADER, 0);//
  18. curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  19. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
  20. curl_setopt($ch, CURLOPT_POST, 1);//post提交方式
  21. curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
  22. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  23. $data = curl_exec($ch);//运行curl
  24. curl_close($ch);
  25. return $data;
  26. }
  27. $url = "https://www.taodaxiang.com/score/index/get11015255";
  28. //$param = 'account=%E5%B0%8F%E7%B1%B3%E6%97%97%E8%88%B0%E5%BA%97&n=0';
  29. $param = 'account='.urlencode('潮流前线zk').'&n=0';
  30. //$param = ['account'=>'小米旗舰店','n'=>0];//urlencode($param);
  31. $res = curl_post($url,$param);
  32. $res = json_decode($res,true);
  33. var_dump($param,$res);