Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Данный код выполняется после регистрации:
- <?php
- $fullname = 'Поле содержит имя зарегистрированного пользователя';
- $lastname = 'Поле содержит фамилию зарегистрированного пользователя';
- $array[] = array('key' => '$name', 'value' => $fullname.' '.$lastname);
- $json = json_encode($array);
- $url = 'https://api.carrotquest.io/v1/users/494448623963080243/props';
- $fields = [
- 'auth_token' => 'app.29882.56d02968f4619dfcb4ab3652c8e0692bc38c57fefb7885b5',
- 'operations' => $json,
- 'by_user_id' => 'true'
- ];
- $fields_string = http_build_query($fields);
- $ch = curl_init();
- curl_setopt($ch,CURLOPT_URL, $url);
- curl_setopt($ch,CURLOPT_POST, true);
- curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
- $res_curl = curl_exec($ch);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement