One Hat Cyber Team
Your IP :
3.144.29.148
Server IP :
50.28.103.30
Server :
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
nginx/1.24.0
PHP Version :
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
globify.live
/
fns
/
video_chat
/
Edit File:
twilio.php
<?php require 'fns/sms_gateway/Twilio/autoload.php'; use Twilio\Jwt\AccessToken; use Twilio\Jwt\Grants\VideoGrant; use Twilio\Rest\Client; use Twilio\Exceptions\RestException; if (isset($data['generate_token']) && !empty($data['generate_token'])) { if (isset($data['generate_token']['channel_name']) && !empty($data['generate_token']['channel_name'])) { $channelName = $data['generate_token']['channel_name']; $accountSid = Registry::load('settings')->vc_twilio_account_sid; $authToken = Registry::load('settings')->vc_twilio_auth_token; $api_key = Registry::load('settings')->vc_twilio_api_key; $twilioApiKeySecret = Registry::load('settings')->vc_twilio_api_secret_key; $twilio = new Client($accountSid, $authToken); $identity = Registry::load('current_user')->id; $room_type = 'group'; if (isset($data['one_to_one']) && $data['one_to_one']) { $room_type = 'go'; } try { $room = $twilio->video->v1->rooms ->create([ "uniqueName" => $channelName, "type" => $room_type ]); } catch (RestException $e) { $result['room_creation_error'] = $e->getMessage(); } $token = new AccessToken( $accountSid, $api_key, $twilioApiKeySecret, 21600, $identity ); $videoGrant = new VideoGrant(); $videoGrant->setRoom($channelName); $token->addGrant($videoGrant); $result = array(); $result['token'] = $token->toJwt(); $result['channel'] = $channelName; } } ?>
Simpan