Videa Blog

Can you Count more Than 1024 PHP Groups in The World?

Tomáš Votruba  

In April 2018 I started a side project to list meetups in Europe near Prague. PHP meetups are so much fun and I didn't find any single-page with a map that would list them. In the start, this site had a small table, with 10 meetups a month, very modern black/white Times New Roman design and advanced human-manual updating.

Since then I got feedback from dozens friends and users with this WTFs and ideas - they helped me to add feature now and then, polish a design with emoji and Bootstrap, automate everything and even crawl over 150 urls. I bought friendsofphp.org domain and the project became a standalone single page.

Today, it's a much bigger project with over...

...well, see for yourself:

1, 2, 3... 1023 groups

I bet there is one group out there that isn't listed yet. It might have a local non-PHP name like "AFUP" community in France.

Whoever finds this group, wins 🍺!

The Most Active Region

I assumed the Czech Republic or Germany is the most active in Europe. I was wrong! Look at Benelux with over 20 meetups in a month!

It would be easy to get lost among all these pins, so we put 2 more colors in.

(Before → After)

Traffic lights to save your eyes: next 7 days | next 14 days | next 30 days

6 More Cool Features

Any tips? Add new issue

How Does the Website Work?

Meetups are downloaded every day by Travis CRON job from Meetup.com for each of 1023 groups. You'll find them manually added in this YAML file in repository. No surprise it runs on Statie and is fully open-sourced on Github.

Although there Meetup API often works as documented, it's not possible to find all PHP groups with it. There is an issue when you search for groups in a specific location, it ignores the location and sets back to your origin city. Pity, that exactly what we need here.

What now?

Maybe instead of API... a crawler could help - and it did:

<?php

require __DIR__ . '/vendor/autoload.php';

use Symfony\Component\DomCrawler\Crawler;

// crawling Slovenia here: 'https://www.meetup.com/topics/php/si/'
$code = 'si';

$crawlUrl = 'https://www.meetup.com/topics/php/' . $code;
$crawler = new Crawler(file_get_contents($crawlUrl));

$meetupNames = [];
// headlines of found groups
foreach ($crawler->filterXPath('//span[@class="text--bold display--block"]') as $node) {
    $meetupNames[] = $node->textContent;
}

var_dump($meetupNames);

After 4 hours of debugging broken API, I got this solution working in roughly 60 minutes. Provide a list of codes for all countries in the world and in a few minutes you have with 800 new PHP groups

(Before → After)

Lesson learned: use what works.

Events are stored with their location and rendered to Open Street Maps with amazing Leaflet framework. You don't have to know any Javascript, because the documentation is so well written.

How much Does it Cost to Travel to abroad Meetup?

There is plenty of reasons not-to-go visit PHP meetup abroad, but the one I hear the most are money.

To give you an idea, here are costs of my trips from Prague to cities nearby:

City Travel Time Travel $ Stay $ Total $
Dresden 2 hours 20 € ~ (go home the same day) 20 €
Vienna 5 hours 30 € 30 € AirBnb / 0 $ friend from meetup 30-60 €
Berlin 5 hours 50 € 40 € AirBnb / 0 $ friend from meetup 40-90 €

In the start, I had to pay Airbnb. But when you go to meetups more than once, you'll remember people, they'll remember you and they're very helpful with your following visits. Just ask to stay over for one night on the floor.

Do You Need Help With $ or Ask Where to Start?

Let me know - I might know a way to help you.


That's all folks. Enjoy your offline PHP friends - friendsofphp.org and have fun!