FSBtoERP - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of FSBtoERP.php
- <?php
- $url = 'http://education-erp.com/api/LandingService/v1/SingleRequest';
- // параметры запроса
- $args = [
- // параметры запроса
- 'body' => [
- "CityId" => null,
- "SchoolId" => 16348,
- "Name" => 'Тест Алексей',
- "ChildName" => null,
- "Phone" => '+77777777777',
- "Type" => 2,
- "Email" => null,
- "SchoolType" => null,
- "UtmSource" => null,
- "UtmCampaign" => null,
- "UtmContent" => null,
- "UtmMedium" => null,
- "UtmTerm" => null,
- "PromoCode" => null,
- "Comment" => null
- ],
- ];
- $response = wp_remote_post( $url, $args );
- // проверка ошибки
- if ( is_wp_error( $response ) ) {
- $error_message = $response->get_error_message();
- echo "Что-то пошло не так: $error_message";
- } else {
- echo 'Ответ: <pre>';
- print_r( $response );
- echo '</pre>';
- }