You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.php 457 B

3 years ago
1234567891011121314151617181920212223
  1. <?php
  2. // 初始化一个 cURL 对象
  3. $curl = curl_init();
  4. // 设置你需要抓取的URL
  5. curl_setopt($curl, CURLOPT_URL, 'http://wx.zhizhuchuxing.com/wechat/WxPay/realpay/test.php');
  6. // 设置header
  7. curl_setopt($curl, CURLOPT_HEADER, 1);
  8. // 设置cURL 参数,要求结果保存到字符串中还是输出到屏幕上。
  9. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  10. // 运行cURL,请求网页
  11. $data = curl_exec($curl);
  12. // 关闭URL请求
  13. curl_close($curl);
  14. // 显示获得的数据
  15. var_dump($data);
  16. ?>