123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <html>
- <head>
- <title>PI: Ridiculously Chill Internet Radio</title>
- <link rel="stylesheet" href="jplayer/lib/circle-player/skin/circle.player.css">
- <script type="text/javascript" src="jplayer/lib/jquery.min.js"></script>
- <script type="text/javascript" src="jplayer/dist/jplayer/jquery.jplayer.min.js"></script>
- <script type="text/javascript" src="jplayer/lib/circle-player/js/jquery.transform2d.js"></script>
- <script type="text/javascript" src="jplayer/lib/circle-player/js/jquery.grab.js"></script>
- <script type="text/javascript" src="jplayer/lib/circle-player/js/mod.csstransforms.min.js"></script>
- <script type="text/javascript" src="jplayer/lib/circle-player/js/circle.player.js"></script>
- <script type="text/javascript">
- //<![CDATA[
- $(document).ready(function(){
- /*
- * Instance CirclePlayer inside jQuery doc ready
- *
- * CirclePlayer(jPlayerSelector, media, options)
- * jPlayerSelector: String - The css selector of the jPlayer div.
- * media: Object - The media object used in jPlayer("setMedia",media).
- * options: Object - The jPlayer options.
- *
- * Multiple instances must set the cssSelectorAncestor in the jPlayer options. Defaults to "#cp_container_1" in CirclePlayer.
- *
- * The CirclePlayer uses the default supplied:"m4a, oga" if not given, which is different from the jPlayer default of supplied:"mp3"
- * Note that the {wmode:"window"} option is set to ensure playback in Firefox 3.6 with the Flash solution.
- * However, the OGA format would be used in this case with the HTML solution.
- */
- /*
- m4a: "http://www.jplayer.org/audio/m4a/Miaow-07-Bubble.m4a",
- oga: "http://www.jplayer.org/audio/ogg/Miaow-07-Bubble.ogg"
- http://xstream1.somafm.com:8300/;stream/1
- */
- var myCirclePlayer = new CirclePlayer("#jquery_jplayer_1",
- {
- mp3: "http://ice1.somafm.com/groovesalad-256-mp3"
- }, {
- cssSelectorAncestor: "#cp_container_1",
- swfPath: "dist/jplayer",
- wmode: "window",
- keyEnabled: true,
- supplied: "mp3",
- preload: "none",
- autoPlay: true
- });
- });
- //]]>
- </script>
- <style>
- /* #title {
- word-wrap: break-word;
- font-family: Arial;
- color: gray;
- font-size: 900%;
- opacity: 0.3;
- display: none;
- }*/
- #title {
- word-wrap: break-word;
- font-family: Arial;
- color: gray;
- font-size: 900%;
- opacity: 0.3;
- }
- body {
- margin: 0;
- }
- #cp_container_1 {
- position: absolute;
- }
- .graphic {
- width: 100%;
- height: 100%;
- margin-left: auto;
- margin-right: auto;
- }
- </style>
- </head>
- <body>
- <div style="position: absolute; width: 100%; height: 100%; overflow: hidden;">
- <div id="title">
- <?php
- if(stristr($_SERVER['SERVER_NAME'], 'localhost') === FALSE)
- {
- $local = 'http://tuvme.xyz/';
- echo 'tuvme';
- }
- else
- {
- $local = 'http://localhost/tuvme.xyz/public_html/';
- echo 'localhost';
- }
- ?>
- </div>
- </div>
- <!-- The jPlayer div must not be hidden. Keep it at the root of the body element to avoid any such problems. -->
- <div id="jquery_jplayer_1" class="cp-jplayer"></div>
- <!-- The container for the interface can go where you want to display it. Show and hide it as you need. -->
- <div id="cp_container_1" class="cp-container">
- <div class="cp-buffer-holder"> <!-- .cp-gt50 only needed when buffer is > than 50% -->
- <div class="cp-buffer-1"></div>
- <div class="cp-buffer-2"></div>
- </div>
- <div class="cp-progress-holder"> <!-- .cp-gt50 only needed when progress is > than 50% -->
- <div class="cp-progress-1"></div>
- <div class="cp-progress-2"></div>
- </div>
- <div class="cp-circle-control"></div>
- <ul class="cp-controls">
- <li><a class="cp-play" tabindex="1">play</a></li>
- <li><a class="cp-pause" style="display:none;" tabindex="1">pause</a></li> <!-- Needs the inline style here, or jQuery.show() uses display:inline instead of display:block -->
- </ul>
- </div>
- <?php
- $choice = 'clear';
- $url = 'http://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&tag='.$choice;
- // Get the document at this url
- //$response = file_get_contents($url);
- $response = file_get_contents($local."giphy.php");
- // Parse XML with SimpleXML in PHP http://www.php.net/manual/en/simplexml.examples-basic.php
- $pics = json_decode($response);
- //echo "<pre>";
- //print_r($pics->data->image_url);
- //echo "</pre>";
- //exit;
- //var_dump($pics); // take a look at this to see what data you get back
- if ($choice == 'clear') {
- echo '';
- // mode: random
- echo '<img class="graphic" src="'.$pics->data->images->original->url.'">';
- } else {
- }
- ?>
- </body>
- </html>
|