Server : LiteSpeed System : Linux server 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : alsaif ( 1057) PHP Version : 7.4.33 Disable Function : show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/alsaif/public_html/administrator/components/com_sppagebuilder--/helpers/ |
<?php
/**
* @package SP Page Builder
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2016 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/
//no direct accees
defined ('_JEXEC') or die ('restricted aceess');
class SppagebuilderHelperIntegrations {
public static function integrations() {
return array( 'com_content', 'com_k2' );
}
public static function integrations_list() {
$integration_api = 'http://sppagebuilder.com/api/integrations/integrations.json';
if( ini_get('allow_url_fopen') ) {
$components = json_decode(file_get_contents($integration_api));
} elseif(extension_loaded('curl')) {
$components = json_decode(self::getCurlData($integration_api));
} else {
$report['message'] = JText::_('Please enable \'cURL\' or url_fopen in PHP or Contact with your Server or Hosting administrator.');
die(json_encode($report));
}
$components = json_decode(file_get_contents('http://sppagebuilder.com/api/integrations/integrations.json'));
$integrations = new stdClass;
foreach ($components as $key => $component) {
if(in_array($key, self::integrations())) {
$integrations->$key = $component;
}
}
return $integrations;
}
}