AnonSec Shell
Server IP : 46.105.57.169  /  Your IP : 216.73.216.144
Web Server : Apache
System : Linux webd003.cluster120.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : maitricfuz ( 93378)
PHP Version : 8.4.10
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/maitricfuz/www/saint-martin-lg/plugins/sliderck/flickr/helper/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/maitricfuz/www/saint-martin-lg/plugins/sliderck/flickr/helper/helper_flickr.php
<?php
/**
 * @name		Slider CK
 * @package		com_slideshow
 * @copyright	Copyright (C) 2016. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 * @author		Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
 */

// No direct access
defined('_JEXEC') or die;

/**
 * Helper Class.
 */
class SliderckHelpersourceFlickr {

	private static $params;

	/*
	 * Get the items from the source
	 */
	public static function getItems(&$params) {
		self::$params = $params;

		$apikey = $params->get('flickr_apikey');
		if (! $apikey) {
			echo '<p>SLIDESHOW CK ERROR : no API Key found for Flickr.</p>';
			return false;
		}
		$photoset = $params->get('flickr_photoset');
		if (! $photoset) {
			echo '<p>SLIDESHOW CK ERROR : no Photoset ID found for Flickr.</p>';
			return false;
		}

		$url = 'https://api.flickr.com/services/rest/?format=json&method=flickr.photosets.getPhotos&extras=description,original_format,url_sq,url_t,url_s,url_m,url_o&nojsoncallback=1';
		$url .= '&api_key=' . $apikey;
		$url .= '&photoset_id=' . $photoset;

		if (ini_get('allow_url_fopen') && function_exists('file_get_contents')) {  
			$result = file_get_contents($url);  
		}
		// look for curl
		if ($result == '' && extension_loaded('curl')) {
			$ch = curl_init();  
			$timeout = 30;  
			curl_setopt($ch, CURLOPT_URL, $url);  
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
			curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);  
			$result = curl_exec($ch);  
			curl_close($ch);  
		}

		$images = json_decode($result)->photoset->photo;
		$items = Array();
		$i = 0;
		$flickrSuffixes = array('o', 'k', 'h', 'b', 'z', 'sq', 't', 'sm', 'm');
		foreach ($images as & $image) {
			$item = SliderckHelper::initItem();
			$suffix = 'o';
			foreach ($flickrSuffixes as $flickrSuffixe) {
				if (isset($image->{'url_' . $flickrSuffixe})) {
					$suffix = $flickrSuffixe;
					break;
				}
			}

			$item->image = $image->{'url_' . $suffix};
			$item->title = $image->title;
			$item->text = $image->description->_content;
			$item->link = $image->{'url_' . $suffix};

			$items[$i] = $item;
			$i++;
		}

		return $items;
	}
}

Anon7 - 2022
AnonSec Team