Jump to content

Search the Community

Showing results for tags 'xenforo'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Emby Premiere Purchase/Subscription Support
    • Feature Requests
    • Tutorials and Guides
  • Emby Server
    • General/Windows
    • Android Server
    • Asustor
    • FreeBSD
    • Linux
    • NetGear ReadyNAS
    • MacOS
    • QNAP
    • Synology
    • TerraMaster NAS
    • Thecus
    • Western Digital
    • DLNA
    • Live TV
  • Emby Apps
    • Amazon Alexa
    • Android Mobile
    • Android TV / Fire TV
    • Emby Theater
    • iOS
    • Apple TV
    • Kodi
    • Raspberry Pi
    • Roku
    • Samsung Smart TV
    • Sony PlayStation
    • LG Smart TV
    • Web App
    • Windows Media Center
    • Plugins
  • Language-specific support
    • Arabic
    • Dutch
    • French
    • German
    • Italian
    • Portuguese
    • Russian
    • Spanish
    • Swedish
  • Community Contributions
    • Ember for Emby
    • Fan Art & Videos
    • Tools and Utilities
    • Web App CSS
  • Other
    • General Discussion
    • Developer API
    • Hardware
    • Media Clubs
    • Legacy Support

Blogs

  • Emby Blog

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. tomnjerry74

    Server stats PHP widget

    Trying to get a better hold of PHP and decided to make a little Xenforo widget for personal use/fun. Obligatory disclaimer: I'm not a coder whatsoever and only accomplished this thanks to @msmcpeake's cURL code (TY!!!). If anyone has suggestions about the code, feel free. <?php namespace tomnjerry\EmbyStats; class LibraryTotals { public static function showTotals() { $apikey = 'API KEY HERE'; $url = 'https://website.com/emby/Items/Counts?api_key=' . $apikey; $movieurl = 'https://website.com/web/index.html#!/videos?serverId=a8976f868223845793&parentId=98qy8954uy3298ruf'; $seriesurl = 'https://website.com/web/index.html#!/tv?serverId=a8976f868223845793&parentId=j9f834uj98f4u98f'; $musicurl = 'https://website.com/web/index.html#!/music?serverId=a8976f868223845793&parentId=93482758934uf894u'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPGET, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $headers = array(); $headers[] = 'Accept: application/json'; $headers[] = 'Content-Type: application/json'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } curl_close($ch); $json = json_decode($result, true); echo '<dl class="pairs pairs--justified"><dt><i class="fas fa-fw fa-ticket-alt"></i> Movies</dt><dd><a target="_blank" href="' . $movieurl . '&tab=movies">' . number_format($json['MovieCount']) . '</a></dd></dl> <dl class="pairs pairs--justified"><dt><i class="fas fa-fw fa-tv-retro"></i> TV Shows</dt><dd><a target="_blank" href="' . $seriesurl . '&tab=shows">' . number_format($json['SeriesCount']) . '</a></dd></dl> <dl class="pairs pairs--justified"><dt><i class="fad fa-fw fa-tv-retro"></i> Episodes</dt><dd><a target="_blank" href="' . $seriesurl . '&tab=episodes">' . number_format($json['EpisodeCount']) . '</a></dd></dl> <dl class="pairs pairs--justified"><dt><i class="fas fa-fw fa-album"></i> Albums</dt><dd><a target="_blank" href="' . $musicurl . '&tab=albums">' . number_format($json['AlbumCount']) . '</a></dd></dl> <dl class="pairs pairs--justified"><dt><i class="fas fa-fw fa-music"></i> Songs</dt><dd><a target="_blank" href="' . $musicurl . '&tab=songs">' . number_format($json['SongCount']) . '</a></dd></dl>'; } }
×
×
  • Create New...