I am using this script I found that pulls the google calendar and then renders it with my css. But sometimes if the google calendar is unavaliable it just list the fopen or fread failed. I think it is around line 56 or 57. Is there a way to display some thing else like calendar is having trouble please try back in a few minutes.
So it would be something like
If fopen fails then print <html> otherwise continue.
Here is a link to the script I have been using.