Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $curl = curl_init();
- curl_setopt_array($curl, [
- CURLOPT_URL => 'https://beta-api.solo-crm.com/mc/form',
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_ENCODING => '',
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 0,
- CURLOPT_FOLLOWLOCATION => true,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => 'POST',
- CURLOPT_POSTFIELDS => [
- 'name' => 'John Smith',
- 'email' => 'test@test.net',
- 'phone' => '+14091453225',
- 'address' => 'Pasadena, Lower Peters Canyon, Irvine, Orange County, USA',
- 'geolocation' => '[]' // То, что возвращает сервис https://locationiq.com, в виде json-строки
- ],
- ]);
- $response = curl_exec($curl);
- curl_close($curl);
- echo $response;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement