如何从bookeo api获取所有预订清单?

时间:2017-11-13 18:30:31

标签: php web-services

我是bookeo预订API的新手,我不明白如何使用php获取预订列表..

https://www.bookeo.com/apiref/index.html#!/Bookings/bookings_get

1 个答案:

答案 0 :(得分:0)

1.The simplest way to launch a request is use the function: file_get_contents. But it only works for GET method.

2.Otherwise,you can use the curl library which is very powerful.

```
   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, "API URL");
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt($ch, CURLOPT_HEADER, 0);
   $output = curl_exec($ch);
   curl_close($ch);
   print_r($output);
```

The more detail usage you can google it.