Files
Testing/blog/wp-content/plugins/quiz-master-next/php/admin/functions.php

14 lines
467 B
PHP
Raw Normal View History

2026-11-17 16:15:01 -05:00
<?php
function qsm_fetch_data_from_xml() {
$file = esc_url('https://quizandsurveymaster.com/addons.xml');
$response = wp_remote_post($file, array('sslverify' => false));
if (is_wp_error($response) || $response['response']['code'] === 404 ) {
return "<p>" . __('Something went wrong', 'quiz-master-next') . "</p>";
}else{
$body = wp_remote_retrieve_body($response);
return $xml = simplexml_load_string($body);
}
}