开发者

Is there a limit of Events I can enter with the google calendar data api?

开发者 https://www.devze.com 2022-12-18 22:38 出处:网络
I\' running a php script to insert events that I take from a CSV file. The events are entering successfully in my calendar, but it stops after about 75 events entered. Any idea if it\'s limited to a c

I' running a php script to insert events that I take from a CSV file. The events are entering successfully in my calendar, but it stops after about 75 events entered. Any idea if it's limited to a certain amount of events or it's a problem in my code.

Thanks in advance for helping me!

  $event->title = $service->newTitle($title);

  $event->where = array($service->newWhere("Red Ball Internet Centre"));


  $service->newContent($content);



  // Set the date using RFC 3339 format.

  $tzOffset = "-04";



  $when = $service->newWhen();

  $when->startTime = "{$startDate}T{$startTime}:00.000{$tzOffset}:00";

  $when->endTime = "{$endDate}T{$endTime}:00.000{$tzOffset}:00";

  $event->when = array($when);

  // Upload the event to the calendar server

  // A copy of the event as it is recorded on the server is returned
  switch($rink)
  {
    case"Rink A":
        $uri = "http://www.google.com/calendar/feeds/qsqivvbvdm7o4ibrmt9gfu301g%40group.calendar.google.com/private/full"; 
    break;
    case"Rink B":
        $uri = "http://www.goog开发者_StackOverflowle.com/calendar/feeds/dcr864c3orqj264mufl1t3slt8%40group.calendar.google.com/private/full"; 
    break;
    case"Rink C":
        $uri = "http://www.google.com/calendar/feeds/bira8i123uuqovhn5kuk9caqnk%40group.calendar.google.com/private/full"; 
    break;
    case"Rink D":
        $uri = "http://www.google.com/calendar/feeds/11a8m100ccjhms971kc33app4g%40group.calendar.google.com/private/full"; 
    break;                  
  }

  $newEvent = $service->insertEvent($event, $uri);


Roughly how long is this script running before it stops? Could it be that you need to increase the MAX_EXECUTION_TIME setting in your php.ini file? It's possible that PHP is timing out before it has a chance to complete.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号