Skip to content

Commit

Permalink
use json for notify
Browse files Browse the repository at this point in the history
  • Loading branch information
pjaudiomv committed Sep 7, 2022
1 parent 021b0d6 commit f354f54
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bmltnotify.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
// show beginning header
$message = "<H2>" .$service_body_name. " CHANGES</H2>Changes for last $howmanydays day(s) from " .date("l jS \of F Y h:i A") . "<br><hr>";

$url = $bmlt_server. "/client_interface/xml/?switcher=GetChanges&start_date=" .$dateminus. "&end_date=" .$today. "&service_body_id=" .$notify_service_body_id;
$url = $bmlt_server. "/client_interface/json/?switcher=GetChanges&start_date=" .$dateminus. "&end_date=" .$today. "&service_body_id=" .$notify_service_body_id;

// get xml file contents
$xml = simplexml_load_file($url);
$json = file_get_contents($url);

if (empty($xml)) {
if (empty($json)) {
// if no changes found do nothing
} else {
// loop begins
foreach ($xml->row as $row) {
$json = json_decode($url);
foreach ($json as $row) {
if (strpos($row->meeting_name, '_YAP_') !== false) {
// dont show YAP data
} else {
Expand Down

0 comments on commit f354f54

Please sign in to comment.