Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $orderData = [
- 'orders' => [
- [
- 'flat_id' => '123456',
- 'theme' => 'Бронирование квартиры на сайте Новоград Павлино',
- 'name' => 'Олеся',
- 'phone' => '+79039620385',
- 'advert_source' => 'google',
- 'company' => 'Компания',
- 'object' => 'Новоград Павлино',
- 'flat_house' => '1',
- 'flat_section' => '2',
- 'flat_floor' => '3',
- 'flat_number' => '55',
- 'flat_rooms' => '3',
- 'flat_clearance_price' => '20000',
- 'flat_price_for_meter' => '32000',
- 'flat_full_price' => '9000000',
- ]
- ]
- ];
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, 'http://cn93703.tmweb.ru/backend/web/data');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'data=' . json_encode($orderData));
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('application/x-www-form-urlencoded; charset=UTF-8'));
- var_dump($out = curl_exec($ch));
- curl_close($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement