There is no such thing like a caldav add-on. Do you mean the calendar app?
BTW, owncloud server IS the CalDAV-Server. Of course it’s possible to edit the calendars with a PHP script, but I strongly doubt that this is what you want. Or I completely misunderstood your post.
Maybe you should try to give more detailed information.