| Server IP : 45.94.215.241 / Your IP : 216.73.216.122 Web Server : Apache/2.4.66 (Ubuntu) System : Linux srv2937474766 7.0.0-28-generic #28-Ubuntu SMP PREEMPT_DYNAMIC Sun Jun 21 01:01:36 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.5.4 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/nikooacademy_crm/students/ |
Upload File : |
<?php
session_start();
$username = '09126276625';
$password = 'aA@09126276625';
$moodle_url = "https://lms.nikoo-academy.com/webservice/rest/server.php";
$token = "9bef8f459e86282f7ea3378f917743c5";
$params = [
'wstoken' => $token,
'wsfunction' => 'core_user_get_users_by_field',
'moodlewsrestformat' => 'json',
'field' => 'username',
'values[0]' => $username
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $moodle_url . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$user_data = json_decode($response, true);
if (!empty($user_data)) {
echo "کاربر در Moodle پیدا شد.";
} else {
echo "کاربر در Moodle وجود ندارد.";
}
?>