title: Importing iCal calendar into MySQL database
body: <p>I've searched through a lot of sites, but all of them do in reverse already what I've achieved , but not what I need. </p>
  
  <p>I need a way to import data FROM ICAL into a MySQL database, actually just one table and a few columns in a WordPress database. But I'm ignoring WordPress (as it messed up my export) and using direct database connection. </p>
  
  <p>Can any of you help me achieve this? Is importing ICAL so obviously simple that I'm thinking way too difficult?</p>
  
  <p>My ICAL docs setup:</p>
  
  <pre><code>BEGIN:VCALENDAR
  VERSION:2.0C
  ALSCALE:GREGORIAN
  METHOD:PUBLISH
  X-WR-TIMEZONE:Europe/Amsterdam
  BEGIN:VEVENT
  DTSTART:20120113T133300
  DTEND:20120223T165900
  DTSTAMP:20120118T093232
  SEQUENCE:0
  STATUS:CONFIRMED
  SUMMARY:29007/on/on
  TRANSP:OPAQUE
  END:VEVENT
  END:VCALENDAR
  </code></pre>
  
  <p>From "BEGIN:" to "END:" also gets repeated when a user exports multiple events. In status I've currently (will change to something else) a post ID, whether or not the event is "on"(true) meaning to be displayed (in order to preserve data of past events), and the 2nd "on" tells the front end whether an event is an all-day event (from 00:00 until 23:59). </p>
  
  <p>So again the question, how could I import this, using just a few lines of code, not a plugin or some other external code, into my table in a WP database? </p>
  
  <p>Thanks in advance!</p>
  
  <p>P.s. -> I just made this profile, not here to leech knowledge, before I created the profile just now I've also answered questions anonymously and corrected some answers in which I spotted mistakes. </p>