Quantcast
Channel: Sanara Creations » coding
Viewing all articles
Browse latest Browse all 12

PHP application to scrape a website and to create .ics vCalendar file from the data

$
0
0

KAVA, The national audiovisual archive of Finland has its own cinema, but they don’t provide standard .ics vCalendar of the movie showtimes for downloading or subscription. However, they have their own web store to buy tickets, and the page is neatly formatted.

I decided to practice PHP scraping a bit and as a bonus to try to create an ICS vCalendar file from the scraped data. The result is basically for my own use, but available for everybody (Download link of the generated calendar). The caveat is that if KAVA decides to change the layout the code wouldn’t work anymore, so be warned that the calendar may be broken then for a while.

The showtimes don’t change that much, so it’s safe to set the update period to once per week. Set the subscription to the address

http://www.sanaracreations.fi/apps/kavacal/kavacal.php

Viewing all articles
Browse latest Browse all 12

Trending Articles