forked from LuisAraujo/API-Tabua-Mare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetSite.php
43 lines (35 loc) · 846 Bytes
/
getSite.php
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
$cod = $_GET['cod'];
$mes = $_GET['mes'];
$ano = $_GET['ano'];
if($mes == 0)
$mes="Jan";
else if($mes == 1)
$mes="Fev";
else if($mes == 2)
$mes="Mar";
else if($mes == 3)
$mes="Abr";
else if($mes == 4)
$mes="Mai";
else if($mes == 5)
$mes="Jun";
else if($mes == 6)
$mes="Jul";
else if($mes == 7)
$mes="Ago";
else if($mes == 8)
$mes="Set";
else if($mes == 9)
$mes="Out";
else if($mes == 10)
$mes="Nov";
else if($mes == 11)
$mes="Dez";
echo 'http://www.mar.mil.br/dhn/chm/box-previsao-mare/tabuas/'.$cod."".$mes."".$ano.'.htm';
$url = file_get_contents('http://www.mar.mil.br/dhn/chm/box-previsao-mare/tabuas/'.$cod."".$mes."".$ano.'.htm');
/*
$url = file_get_contents('http://ondas.cptec.inpe.br/~rondas/mares/index.php?cod='.$cod.'&mes='.$mes.'&ano='.$ano);
*/
echo $url;
?>