The York Spring Festival welcomes schools from around York to a day which will introduce young people to various aspects of new music. Through practical performance and composition workshops, as well as performances by University of York student players, the students will be encouraged to creatively explore and listen to new music. A focus to the day will be provided by some of the Key Stage 3 set-works and themes.
If you or your school would like to be part of the day, please contact us.
Latest from Twitter
-
/* twitter-rss-to-html.php
Twitter-RSS-to-HTML for PHP by Rogers Cadenhead
Version 1.1
Web: http://www.cadenhead.org/workbench/twitter-rss-to-html
Copyright (C) 2008 Rogers Cadenhead
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
// a PHP script to display Twitter updates from a user's RSS feed on a web page
require_once("magpierss/rss_fetch.inc");
define('MAGPIE_INPUT_ENCODING', 'UTF-8');
define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');
// set up script variables
// the user's RSS feed on Twitter
$remote_url = "http://twitter.com/statuses/user_timeline/ysfnm.rss";
// the number of tweets to display (or -1 to display all)
$tweets_to_display = 4;
// the page where the tweet(s) will be displayed
$page = "http://www.yorkspingfestival.co.uk/";
// the user's Twitter username
$username = "YSFNM";
$rss = fetch_rss($remote_url);
// start buffering output
ob_start();
$count = 1;
$now = time();
foreach ($rss->items as $item) {
// limit the number of tweets displayed
if ($tweets_to_display > 0) {
if ($count > $tweets_to_display) {
continue;
}
}
$tweet = $item['description'];
$link = $item['link'];
// ignore tweets linking back to page (if it is defined)
if ($page != "") {
if (!strpos($tweet, $page) === false) {
continue;
}
}
// figure out how recently the tweet was posted
$when = ($now - strtotime($item['pubdate']));
$posted = "";
if ($when < 60) {
$posted = $when . " seconds ago";
}
if (($posted == "") & ($when < 3600)) {
$posted = "about " . (floor($when / 60)) . " minutes ago";
}
if (($posted == "") & ($when < 7200)) {
$posted = "about 1 hour ago";
}
if (($posted == "") & ($when < 86400)) {
$posted = "about " . (floor($when / 3600)) . " hours ago";
}
if (($posted == "") & ($when < 172800)) {
$posted = "about 1 day ago";
}
if ($posted == "") {
$posted = (floor($when / 86400)) . " days ago";
}
// filter the user's username out of tweets
$tweet = str_replace($username . ": ", "", $tweet);
// turn URLs into hyperlinks
$tweet = preg_replace("/(http:\/\/)(.*?)\/([\w\.\/\&\=\?\-\,\:\;\#\_\~\%\+]*)/", "\\0", $tweet);
// link to users in replies
$tweet = preg_replace("(@([a-zA-Z0-9\_]+))", "\\0", $tweet);
// add the time posted
$tweet = $tweet . " " . $posted . " →";
echo ("\n\n
- " . $tweet ." "); $count++; } // display output ob_end_flush(); ?>

