title: Exposing calendar as an iCal with subscribe option in PHP
body: <p>I have an application in PHP where each user has his associated events.</p>
  
  <p>What I want to do is to expose his events under in a way similar to events on facebook which gives urls in format <code>webcal://www.facebook.com/ical/b.php?uid=123456789&amp;key=ASD123ASD123ASD</code> and whenever there's a new event, it automatically gets propagated to my calendar which I have added to my google calendar.</p>
  
  <p>What I want to do is expose this calendar on a url such as <code>http://whatever.org/someLongUniquePerUserIdentifier.ics</code>.</p>
  
  <p>I tried to simulate the event generation script with a simple file that was at the same url. It was an ics file that was consumed by google, the events have been added, but when I changed the file contents (deleted an event) = altered the resource, to which google calendar should be subscribed, the change simply didn't go through to gcal. </p>
  
  <p>As I was unable to find any reliable source of documentation, I tried to google a lot with different keywords and I was only guided to webdav servers like DAVical, sabredav, etc.</p>
  
  <p>I have installed DAVical on my server only to getting to a state where I have the server properly installed but no idea how to expose the events from my MySQL database on my desired url, which would the clients subscribe to. </p>
  
  <p>Same with sabredav, except for the fact, that I haven't tried getting it to work, because I can't see any documented way of getting my events out to the world using any of the dav server. </p>
  
  <p>I am basically stuck in a place where I have working ics export in PHP which is not getting asked for updates by calendar clients, and a running CalDAV server which might be asked by clients for updates, but has no data to return.</p>
  
  <p>Any thoughts?</p>
  
  <p><strong>EDITED QUESTION:</strong></p>
  
  <p>What is the right way to achieve instant one-way calendar sync?</p>