优惠券订单及其他脚本

2.php 743B

1234567891011121314151617181920
  1. <?php
  2. $url = "https://hdc1.alicdn.com/asyn.htm?userId=4131659450";
  3. //header("Content-Type:application/json;charset=GBK");
  4. $ch = curl_init();//初始化curl
  5. curl_setopt($ch, CURLOPT_URL,$url);
  6. curl_setopt($ch, CURLOPT_HEADER, 1);//
  7. //curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  8. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
  9. //curl_setopt($ch, CURLOPT_POST, 1);//post提交方式
  10. //curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
  11. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  12. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  13. $data = curl_exec($ch);//运行curl
  14. curl_close($ch);
  15. //mb_convert_encoding($data, 'utf-8', 'GBK,UTF-8,ASCII');
  16. echo $data;