You are here

protected function ProfileStatSender::getServerUrl in Brainstorm profile 8

Returns server url from datafile.

Return value

string Returns decrypted server url.

1 call to ProfileStatSender::getServerUrl()
ProfileStatSender::sendData in module/custom/profile_stat_sender/src/ProfileStatSender.php
Makes http POST request to server.

File

module/custom/profile_stat_sender/src/ProfileStatSender.php, line 86
This file contains ProfileStatSender service implementation.

Class

ProfileStatSender
Provides ProfileStatSender service implementation.

Namespace

Drupal\profile_stat_sender

Code

protected function getServerUrl() {
  $path = drupal_get_path('module', 'profile_stat_sender');
  $server_url = file_get_contents($path . '/includes/profile_stat_sender_data.inc');
  $server_url = base64_decode(str_pad(strtr($server_url, '-_', '+/'), strlen($server_url) % 4, '=', STR_PAD_RIGHT));
  return $server_url;
}