Subscribe to Techmeme Tech Events in your Calendar

Published in: techmeme

Techmeme Tech Events

Techmeme recently added an events section to their website – see  - that lists upcoming (and newsworthy) events focused on the tech industry. It’s a pretty useful list, curated by Techmeme editors, and includes tech events around new product launches, upcoming conferences, earnings calls of tech companies, webcasts, and related events.

The Techmeme blog has more details on how event organizers can get their own event listed on Techmeme. If you are organizing a Tedx or a BarCamp in your city, Techmeme may not find that very interesting but if you are doing a WordCamp that people like Matt {Cutts|Mullenweg} are attending, your event will probably make it to the Techmeme events page.

Subscribe to Techmeme Events in your Calendar

The Techmeme Events page currently doesn’t offer an ICAL / ICS feed so it is difficult to keep track of upcoming tech events in your Microsoft Outlook, Apple iCal or Google Calendar. There’s however a little workaround.

[box style=“light-green”][Add to Google Calendar]( | Add to Outlook Calendar | Subscribe in any Calendar[/box]

You can use either of the above links to add Techmeme events directly to your web / desktop calendar. These are standard ICS files that should be compatible with most calendar application across all platforms.

Thus, if Apple is scheduling an event during the first week of March, it should automatically pop-up in your calendar courtesy Techmeme. [Picture Credits: Wired]

The Source Code

The above ICAL/ICS files for Techmeme are generated with the help of some PHP and web scraping. The script basically downloads the Techmeme events page, extracts all the event related DIVs and formats everything in the iCalendar format. Should you be interested in enhancing / modifying the script, here’s the full source code:

$url  = "";
$day  = date("Ymd");
$file = 'techmeme.' . $day;
$feed = 'calendar.ics';

//Grab the Techmeme Events page once per day
if (!file_exists($file) || !file_exists($feed)) {
 $html = file_get_contents($url);
 $fp   = fopen($file, 'w');
 fwrite($fp, $html);

//Declare header for Google Calendar
 PRODID:-//Techmeme//Events v1.0//EN
 X-WR-CALNAME:Techmeme Events
 X-WR-CALDESC:Upcoming Tech Events curated by Techmeme";

$events = "";
$next   = false;
$year   = date("Y");
$html   = file($file);

//XPath for Event DIVs
foreach ($html as $line) {
 if(preg_match('/<div class="rhov">
       <a href="\\/goto\\/(.\*?)"><div>
       (.\*?)<\\/div><\\/a><\\/div>/',$line, $match)) {
  $eventURL   = "http://" . $match[1];
  $eventDt  = $match[2];
  if(preg_match('/(.\*)?-(.\*)/', $eventDt, $date)) {
    $eventDt = $date[1];

  $eventTitle = $match[3];
  $eventVenue = $match[4];
  $month = substr($eventDt, 0, 3);

  //Advance the year after December
  if ($month == "Dec")
   $next = true;

  if ($next && $month != "Dec")
   $eventDt .= " " . (date("Y") + 1);

 //Write an All-Day event to the Calendar
  $events .= "\\n" . "BEGIN:VEVENT";
  $events .= "\\n" . "DTSTART;VALUE=DATE:"
           . gmdate("Ymd", strtotime($eventDt));
  $events .= "\\n" . "DTEND;VALUE=DATE:"
           . gmdate("Ymd", strtotime($eventDt . " +1 day"));
  $events .= "\\n" . "SUMMARY:" . $eventTitle;
  $events .= "\\n" . "DESCRIPTION:" . $eventTitle
           . " " .  $eventURL;
  $events .= "\\n" . "UID:" . strtolower(ereg_replace
             ("[^A-Za-z0-9]", "",
             $eventTitle . $eventVenue . $eventDt)) .

  if ($eventVenue != "")
   $events .= "\\n" . "LOCATION:" . $eventVenue;

  $events .= "\\n" . "END:VEVENT";

$header .= $events . "\\nEND:VCALENDAR";
$fmeme   = fopen($feed, "w");

//Save the Parsed Events to a physical file
fwrite($fmeme, $header);

//Echo the Calendar .ICS file
header("Content-type: text/calendar; charset=utf-8");
header("Content-Disposition: inline; filename=$feed");
echo file_get_contents("$feed");
📮  Subscribe to our Email Newsletter for Google tips and tutorials!
Published in: techmeme

Looking for something? Find here!

Meet the Author

Web Geek, Google Developer Expert
Amit Agarwal

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India. He is the developer of Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Get in touch

Google Add-ons

Do more with your Gmail and GSuite account

We build bespoke solutions that use the capabilities and the features of Google Workspace for automating business processes and driving work productivity.

  1. Mail Merge with Attachments
    Send personalized email to your Google Contact with a Google Sheet and Gmail
  2. Save Emails and Attachments
    Download email messages and file attachments from Gmail to your Google Drive
  3. Google Forms Email Notifications
    Send email notifications to multiple people when a new Google Form is submitted
  4. Document Studio
    Create beautiful pixel perfect documents merging data from Google Sheets and Google Forms
  5. Creator Studio for Google Slides
    Turn your Google Slides presentations into animated GIFs and videos for uploading to YouTube