{"id":37,"date":"2004-06-12T00:12:12","date_gmt":"2004-06-12T00:12:12","guid":{"rendered":"http:\/\/applecrumble.wordpress.com\/2004\/06\/12\/on-my-speakers\/"},"modified":"2017-10-01T13:20:29","modified_gmt":"2017-10-01T13:20:29","slug":"on-my-speakers","status":"publish","type":"post","link":"https:\/\/andrewdoran.uk\/blog\/2004\/06\/12\/on-my-speakers\/","title":{"rendered":"On my speakers"},"content":{"rendered":"<div class='e-content'>I had an email from <a href=\"https:\/\/web.archive.org\/web\/20121116161257\/http:\/\/www.brainfire.co.uk:80\/blog\/\" title=\"Mat&#039;s blog\">Mat<\/a> this week asking how I get the &#8216;On my speakers&#8217; sidebar feature on my blog.  Instead of just telling Mat, I thought I&#8217;d share with you all!<br \/>\n<!--more--><br \/>\nI&#8217;d wanted to add this feature to the blog for some time due to some unexplained geeky desire.  I came across <a href=\"http:\/\/ask.metafilter.com\/mefi\/6157\" title=\"Ask Metafilter post about IndieRock\">a post<\/a> on <a href=\"http:\/\/ask.metafilter.com\/\" title=\"Ask MetaFilter\">Ask MetaFlter<\/a> by chance and it pointed me to the website of <a href=\"http:\/\/www.seniorjunior.org\/code\/\" title=\"IndieRock\">IndieRock<\/a>, an application that was created in response to an earlier Ask MetaFilter post!<\/p>\n<p>Basically, IndieRock monitors what iTunes is playing and outputs a plain text file to an FTP server.  Simple as that.  I&#8217;ve got mine to start up when I log in, so it&#8217;s almost all set every time I use my PC.  I say <i>almost<\/i> as unfortunately you have to type your FTP password at the start of every session, but I don&#8217;t see this as a terrible inconvenience &#8211; it helps me to remember what my password is!<\/p>\n<p>Once the text file is in a suitable place on the server, I include a breakdown of the first line using an embedded PHP script as follows:<\/p>\n<p><code><br \/>\n&lt;div class=\"side\"&gt;<br \/>\n&lt;?php<br \/>\n$filename = 'indierock.txt';<br \/>\n$size = filesize($filename);<br \/>\nif($size == \"0\"){<br \/>\n                print(\"&lt;em&gt;currently not loaded&lt;\/em&gt;&lt;br\/&gt;\");<br \/>\n} else {<br \/>\n                $file = file(\"indierock.txt\");<br \/>\n                foreach($file as $line) {<br \/>\n                $elements = explode(\"t\", $line);<br \/>\n                break;<br \/>\n                }<br \/>\n                if($elements[0] == \"Unknown Artist\"){<br \/>\n                } else {<br \/>\n                print(\"Artist: \" . $elements[0] . \"&lt;br\/&gt;\");<br \/>\n                }<br \/>\n                if($elements[1] == \"Unknown Title\"){<br \/>\n                } else {<br \/>\n                print(\"Song: \" . $elements [1] . \"&lt;br\/&gt;\");<br \/>\n                }<br \/>\n                if ($elements[2] == \"Unknown Album\"){<br \/>\n                } else {<br \/>\n                print(\"Album: \" . $elements[2] . \"&lt;br\/&gt;\");<br \/>\n                }<br \/>\n}<br \/>\n?&gt;<br \/>\n&lt;\/div&gt;<br \/>\n<\/code><\/p>\n<p>I then had to put the following in a file called .htaccess in the public_html folder on the web server:<\/p>\n<p><code><br \/>\nRemoveHandler .html .htm<br \/>\nAddType application\/x-httpd-php .php .htm .html<br \/>\n<\/code><\/p>\n<p>This tells Apache (the web server) to do something with the embedded PHP instead of just displaying the code.<\/p>\n<p>That&#8217;s it!<\/p><\/div>\n<p><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:6896,&quot;href&quot;:&quot;http:\\\/\\\/ask.metafilter.com\\\/mefi\\\/6157&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20080820204923\\\/http:\\\/\\\/ask.metafilter.com\\\/mefi\\\/6157&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-05 16:55:51&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-13 18:18:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-12 17:37:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-08 10:51:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-21 00:27:01&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-21 00:27:01&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:6771,&quot;href&quot;:&quot;http:\\\/\\\/ask.metafilter.com&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260205162522\\\/https:\\\/\\\/ask.metafilter.com\\\/&quot;,&quot;redirect_href&quot;:&quot;https:\\\/\\\/ask.metafilter.com\\\/&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-08 22:32:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-12 14:35:41&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-07 21:10:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-12 17:37:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-08 10:51:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-21 00:27:01&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-21 00:27:01&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:6897,&quot;href&quot;:&quot;http:\\\/\\\/www.seniorjunior.org\\\/code&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20090514073836\\\/http:\\\/\\\/seniorjunior.org:80\\\/code\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-05 16:55:57&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-13 18:18:57&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-12 17:37:56&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-05-08 10:51:44&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-05-21 00:27:09&quot;,&quot;http_code&quot;:503}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-21 00:27:09&quot;,&quot;http_code&quot;:503},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/andrewdoran.uk\/blog\/2004\/06\/12\/on-my-speakers\/\" rel=\"bookmark\" title=\"Permalink to On my speakers\"><div class='e-content p-summary'>I had an email from Mat this week asking how I get the &#8216;On my speakers&#8217; sidebar feature on my blog. Instead of just telling Mat, I thought I&#8217;d share with you all!<\/div>\n<\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[12],"tags":[],"class_list":{"0":"post-37","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-music","7":"h-entry","9":"hentry"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":9681,"url":"https:\/\/andrewdoran.uk\/blog\/2022\/12\/01\/9681\/","url_meta":{"origin":37,"position":0},"title":"\ud83d\udeb2 Fantastic new feature from\u2026","author":"Andrew Doran","date":"1 December 2022","format":"status","excerpt":"\ud83d\udeb2 Fantastic new feature from TrainerRoad. They\u2019ll now automatically use data from indoor and outdoor rides to detect what a rider\u2019s functional threshold power (FTP) should be set to. This number determines the power targets for future planned workouts. Brilliant idea.","rel":"","context":"In &quot;Snippets&quot;","block_context":{"text":"Snippets","link":"https:\/\/andrewdoran.uk\/blog\/category\/snippets\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6059,"url":"https:\/\/andrewdoran.uk\/blog\/2020\/05\/05\/6059\/","url_meta":{"origin":37,"position":1},"title":"Started my next programme on\u2026","author":"Andrew Doran","date":"5 May 2020","format":"status","excerpt":"Started my next programme on TrainerRoad today. Always begins with a ramp test and for the first time ever the suggested FTP was somewhere near to what I had set it to already. The next programme is a bit tougher so I\u2019m hopeful that I\u2019ve got the setting right.","rel":"","context":"In &quot;Snippets&quot;","block_context":{"text":"Snippets","link":"https:\/\/andrewdoran.uk\/blog\/category\/snippets\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9964,"url":"https:\/\/andrewdoran.uk\/blog\/2023\/03\/06\/weeknotes-210-sit-bones\/","url_meta":{"origin":37,"position":2},"title":"Weeknotes #210 \u2014 Sit bones","author":"Andrew Doran","date":"6 March 2023","format":false,"excerpt":"A four-day week as I took Friday off for my wife\u2019s birthday. Work is ramping up. For the first time in a while I found myself picking my laptop up again in the evenings, trying to wrestle a few things forward. On the one day I worked from home my\u2026","rel":"","context":"In &quot;Weeknotes&quot;","block_context":{"text":"Weeknotes","link":"https:\/\/andrewdoran.uk\/blog\/category\/weeknotes\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/03\/DraggedImage-scaled.jpeg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/03\/DraggedImage-scaled.jpeg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/03\/DraggedImage-scaled.jpeg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/03\/DraggedImage-scaled.jpeg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/03\/DraggedImage-scaled.jpeg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/03\/DraggedImage-scaled.jpeg?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":67,"url":"https:\/\/andrewdoran.uk\/blog\/2004\/10\/27\/out-with-mat\/","url_meta":{"origin":37,"position":3},"title":"Out with Mat","author":"Andrew Doran","date":"27 October 2004","format":false,"excerpt":"Had a rare night out in London after work yesterday with Mat. After he managed to navigate the various exits at Waterloo we made our way over to the Gourmet Pizza restaurant at Gabriel's Wharf. We had a great time - I munched on a gorgeous Cajun pizza (with prawns\u2026","rel":"","context":"In &quot;Social&quot;","block_context":{"text":"Social","link":"https:\/\/andrewdoran.uk\/blog\/category\/social\/"},"img":{"alt_text":"Mat","src":"https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2020\/04\/352102337_3371ea0a27_o.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":9816,"url":"https:\/\/andrewdoran.uk\/blog\/2023\/01\/08\/weeknotes-202-sparkly-windows\/","url_meta":{"origin":37,"position":4},"title":"Weeknotes #202 \u2014 Sparkly windows","author":"Andrew Doran","date":"8 January 2023","format":false,"excerpt":"It felt good to be back to work this week. My two working days were spent at home due to the rail strikes; given how miserable the weather was and how many people were still off on holiday, I was very glad not to have ventured in. Lots of the\u2026","rel":"","context":"In &quot;Weeknotes&quot;","block_context":{"text":"Weeknotes","link":"https:\/\/andrewdoran.uk\/blog\/category\/weeknotes\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/01\/DraggedImage.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/01\/DraggedImage.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/01\/DraggedImage.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/01\/DraggedImage.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/01\/DraggedImage.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/andrewdoran.uk\/blog\/wp-content\/uploads\/2023\/01\/DraggedImage.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":190,"url":"https:\/\/andrewdoran.uk\/blog\/2006\/01\/15\/boys-night-out-in-berko\/","url_meta":{"origin":37,"position":5},"title":"Boys night out in Berko","author":"Andrew Doran","date":"15 January 2006","format":false,"excerpt":"Had a great night out on the town last night with Mat, Trevor, Stuart and Iain, visiting a few local pubs that we hadn't been to before. We started off with a couple of beers at my place before wandering down to the High Street and into the Rose &\u2026","rel":"","context":"In &quot;Berkhamsted&quot;","block_context":{"text":"Berkhamsted","link":"https:\/\/andrewdoran.uk\/blog\/category\/berkhamsted\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/andrewdoran.uk\/blog\/wp-json\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andrewdoran.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andrewdoran.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andrewdoran.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andrewdoran.uk\/blog\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":2,"href":"https:\/\/andrewdoran.uk\/blog\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":3587,"href":"https:\/\/andrewdoran.uk\/blog\/wp-json\/wp\/v2\/posts\/37\/revisions\/3587"}],"wp:attachment":[{"href":"https:\/\/andrewdoran.uk\/blog\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andrewdoran.uk\/blog\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andrewdoran.uk\/blog\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}