Alasdair,

I would do something like this...

<?php

$arrChannels=array("radio1/programmes/schedules","1xtra/programmes/schedules","radio2/programmes/schedules","radio3/programmes/schedules","radio4/programmes/schedules/fm",
"radio4/programmes/schedules/lw","fivelive/programmes/schedules","5livesportsextra/programmes/schedules","6music/programmes/schedules","bbc7/programmes/schedules",
"worldservice/programmes/schedules","radioscotland/programmes/schedules/fm","bbchd/programmes/schedules","bbctwo/programmes/schedules/england","cbbc/programmes/schedules",
"cbeebies/programmes/schedules","bbcthree/programmes/schedules","bbcfour/programmes/schedules","bbcnews/programmes/schedules","parliament/programmes/schedules","bbcone/programmes/schedules/london");

$dtToday = getdate();

$strD=$dtToday["mday"]; if (($strD+0)<10) $strD="0$strD";
$strM=$dtToday["mon"];  if (($strM+0)<10) $strM="0$strM";
$strY=$dtToday["year"];


$strAllData="";

foreach ($arrChannels as $strChannel)
  {

   $strAllData.=file_get_contents("
http://www.bbc.co.uk/$strChannel/$strY/$strM/$strD.xml";);

  }




  echo $strAllData;



  ?>


This gets the whole damn lot for the day in XML.

The code runs here:

http://ukfree.tv/igoogle/a/getalltodaysschedule.php5




2008/7/9 Alasdair King <[EMAIL PROTECTED]>:

> Brian, that's very helpful, thank-you. It's more work than I was
> hoping to have to do, but I'll give it a shot!
>
> Alasdair
>
> On Wed, Jul 9, 2008 at 7:42 PM, Brian Butterworth <[EMAIL PROTECTED]>
> wrote:
> > Alasdair,
> >
> > You can easily get the current iPlayer programmes by using the
> /programmes
> > feeds.
> >
> > You can get each channel's programme listing for each day by using, for
> > example:
> >
> > http://www.bbc.co.uk/bbcone/programmes/schedules/london/2008/07/09.xml
> >
> > You will find in the XML an <iplayer> tag:
> >
> > <iplayer>
> > <audio_expires/>
> > <video_expires>2008-07-16T04:39:00+01:00</video_expires>
> > </iplayer>
> >
> > Which tells you if it's audio or video and when it expires.
> >
> > Also in each <broadcast> item is a <pid> field, which you use to get to
> the
> > iPlayer content.   (not the PID in the <series> section). Just use a URL
> > starting http://www.bbc.co.uk/iplayer/episode/ with the PID on the end
> to
> > get to the content.
> >
> > The other TV URLs are:
> >
> > http://www.bbc.co.uk/bbctwo/programmes/schedules/england/
> > http://www.bbc.co.uk/cbbc/programmes/schedules/
> > http://www.bbc.co.uk/cbeebies/programmes/schedules/
> > http://www.bbc.co.uk/bbcthree/programmes/schedules/
> > http://www.bbc.co.uk/bbcfour/programmes/schedules/
> > http://www.bbc.co.uk/bbcnews/programmes/schedules/
> > http://www.bbc.co.uk/parliament/programmes/schedules/
> >
> > I hope this helps.
> >
> > 2008/7/9 Alasdair King <[EMAIL PROTECTED]>:
> >>
> >> (Apologies if you've heard this all before)
> >>
> >> I write several very popular applications for blind people to allow
> >> them to access BBC content easily:
> >> http://www.webbie.org.uk/accessiblebbc/index.htm
> >> http://www.webbie.org.uk/accessibleradio/index.htm
> >> http://www.webbie.org.uk/accessiblebbciplayer/index.htm
> >>
> >> They all work by screen-scraping and using webbrowser automation to
> >> extract the simple information I need to be able to present blind
> >> people with easy-to-use lists of available content, for example:
> >> - All the radio programs available through Listen Again for a given
> >> channel.
> >> - All the TV programs available through iPlayer right now.
> >> - All the live radio stations currently available.
> >>
> >> I would LOVE, and have repeatedly requested to anyone kind enough to
> >> listen, some kind of OPML/RSS/RDF source for the content. Then I could
> >> stop my screen-scraping, which of course breaks when the BBC updates
> >> their website (hardly ever, thanks guys!) and spend my limited
> >> development time on a different open-source and free accessibility
> >> project for blind people. I can only assume that some politics are
> >> preventing this, since it doesn't seem a technically-challenging
> >> problem.
> >>
> >> Best wishes,
> >> Dr. Alasdair King
> >> WebbIE
> >> http://www.webbie.org.uk
> >>
> >>
> >> On Wed, Jul 9, 2008 at 10:50 AM, David Johnston <[EMAIL PROTECTED]>
> wrote:
> >> > 2008/7/9 Brian Butterworth <[EMAIL PROTECTED]>:
> >> >> Or perhaps just one big
> >> >> http://feeds.bbc.co.uk/iplayer/catalogue.xml
> >> >> with the whole structure in it?
> >> >
> >> > That'd work better :)
> >> >
> >> > -d
> >> > -
> >> > Sent via the backstage.bbc.co.uk developer discussion group.  To
> >> > unsubscribe, please send an email to [EMAIL PROTECTED] with
> >> >  unsubscribe backstage-developer [your email] as the message.
> >> >
> >>
> >>
> >>
> >> --
> >> Alasdair King
> >> -
> >> Sent via the backstage.bbc.co.uk developer discussion group.  To
> >> unsubscribe, please send an email to [EMAIL PROTECTED] with
> >>  unsubscribe backstage-developer [your email] as the message.
> >
> >
> >
> > --
> >
> > Brian Butterworth
> >
> > http://www.ukfree.tv - independent digital television and switchover
> advice,
> > since 2002
>
>
>
> --
> Alasdair King
> -
> Sent via the backstage.bbc.co.uk developer discussion group.  To
> unsubscribe, please send an email to [EMAIL PROTECTED] with
>  unsubscribe backstage-developer [your email] as the message.
>



-- 

Brian Butterworth

http://www.ukfree.tv - independent digital television and switchover advice,
since 2002

Attachment: getalltodaysschedule.php5
Description: Binary data

Reply via email to