Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrjones-plip/meetupscraper
A Meetup PHP scraper class for getting a multi-dimensional array of past or future events for a given group
https://github.com/mrjones-plip/meetupscraper
meetup php php-library
Last synced: 24 days ago
JSON representation
A Meetup PHP scraper class for getting a multi-dimensional array of past or future events for a given group
- Host: GitHub
- URL: https://github.com/mrjones-plip/meetupscraper
- Owner: mrjones-plip
- License: mit
- Created: 2019-11-16T20:52:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-09T01:12:58.000Z (about 1 year ago)
- Last Synced: 2024-03-18T18:10:39.325Z (10 months ago)
- Topics: meetup, php, php-library
- Language: PHP
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MeetupEvents.php
A PHP scraper class for getting a multi-dimensional array of events for a given group.
This is likely very fragile, as all HTML scrapers are ;) If you want more stability, Meetup
has an API: https://www.meetup.com/meetup_api/
This plugin requires php-xml: https://www.php.net/manual/en/dom.installation.php## Sample Code
Here we pass in `synshop` into the `get_future_meetup_events()` method to get the events future from the [SYN Shop](https://www.meetup.com/synshop/events/) group and then loop through the resulting `$events` array printing out the `human_date` and `title` and then stop after 6 events:
```php
get_future_meetup_events('synshop');
$count = 1;
foreach ( $events as $event){
print "{$event['human_date']}";
print "{$event['title']}";
$count++;
if ($count > 6) break;
}
```To show past events, you would have called `get_past_meetup_events()` instead.
## Event Elements
The script returns and array of events. Each event has the following key value pairs:
* link
* title
* epoch
* human_date
* description
* status (active or cancelled)
* img (may be `UNSET` or is path to image for event)
* locationHere's a `var_dump()` of a sample event:
```
Array
(
[status] => active
[link] => https://www.meetup.com/synshop/events/bfhxflyzmbvb/
[title] => Paid Members Only: Danger Room Tools and Shop Orientation
[epoch] => 15686856
[human_date] => Mon, Sep 16, 7:00 PM
[description] => Tonight we cover the major rules in the Danger room, and the Major Rules for safety in the danger room.
[img] => https://secure.meetupstatic.com/photos/event/2/a/6/e/event_0862.webp
[locaiton] => Link visible for attendees
)
```