I have been looking around on the internet for the ways to get dates of an event and then store that date into the database, but I was not able to find much.
I was able to get the dates from the website, but I don't know how to store it.
I want to get dates only from the website and then store it in the format of Y-m-d. Please if you know any way to do this, tell me.
Link: https://www.brent.gov.uk/events-and-whats-on-calendar/?eventCat=Wembley+Stadium+events
<?php
$curl = curl_init();
$all_data = array();
$url = "https://www.brent.gov.uk/events-and-whats-on-calendar/?eventCat=Wembley+Stadium+events";
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($curl);
$event = array();
preg_match_all('/<h3 style="margin:0px!important;">(.*?)<\/h3>/si',$result,$match);
$event['title'] = $match[1];
print_r($event['title']);
echo $all_data;
?>