-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess.php
More file actions
31 lines (24 loc) · 774 Bytes
/
process.php
File metadata and controls
31 lines (24 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
include('./autoload.php');
// villes demandées
$aUser = [
'83440' => 'MONTAUROUX',
'06110' => 'LE CANNET',
'06250' => 'MOUGINS'
];
// clés Free Mobile pour envoi SMS
$aUserParams = [
'user' => 'XXXXXXXX',
'secret' => 'XXXXXXXXXXXX'
];
/**
* Parser Html existant
*/
$aHtmlParserType = [
'ILE-DE-FRANCE' => 'https://www.airparif.asso.fr/etat-air/air-et-climat-commune/ninsee/{{codeInsee}}',
'PROVENCE-ALPES-COTE-D-AZUR' => 'https://www.atmosud.org/monair/commune/{{codeInsee}}'];
// Récupération des infos des villes demandées
$oTown = new TownToCheck();
$soInseeDatas = $oTown->getInseeDatas($aUser);
$aUserTown = AirQuality::getUserTown($soInseeDatas, $aUser, $aHtmlParserType);
AirQuality::process($aUserTown, $aUserParams);